Examples of FileInfo


Examples of com.google.jstestdriver.FileInfo

        streamOne, streamTwo), Collections.<JstdTestCase> emptyList(), null),
        runDataOne.aggregateResponses(runDataTwo));
  }

  public void testRecordResponse() throws Exception {
    FileInfo one = new FileInfo("one", -1, -1, false, false, null, "one");
    ResponseStream streamOne = new NoopStream();
    ResponseStream streamTwo = new NoopStream();
    final RunData runDataOne = new RunData(Lists
        .newArrayList(streamOne), Collections.<JstdTestCase> emptyList(), null);
View Full Code Here

Examples of com.google.jstestdriver.FileInfo

        runDataOne.recordResponse(streamTwo));
  }

  public void testUpdateFileSet() throws Exception {
    ResponseStream streamOne = new NoopStream();
    FileInfo one = new FileInfo("one", -1, -1, false, false, null, "one");
    FileInfo two = new FileInfo("two", -1, -1, false, false, null, "two");
   
    final JstdTestCaseFactory testCaseFactory =
        new JstdTestCaseFactory(
            Sets.<JstdTestCaseProcessor>newHashSet(),
            Collections.<ResourceDependencyResolver>emptySet(), new NullStopWatch());
View Full Code Here

Examples of com.google.jstestdriver.FileInfo

*/
public class JstdTestCaseFactoryTest extends TestCase {

  public void testCreateWithTests() throws Exception {
    List<FileInfo> files = Lists.newArrayList();
    FileInfo one = new FileInfo("one.js", 1234, -1, false, false, null, "one.js");
    FileInfo two = new FileInfo("two.js", 1234, -1, false, false, null, "two.js");
    FileInfo three = new FileInfo("three.js", 1234, -1, false, false, null, "three.js");
    files.add(one);
    files.add(two);
    files.add(three);

    FileInfo testOne = new FileInfo("oneTest.js", 1234, -1, false, false, null, "oneTest.js");
    FileInfo testTwo = new FileInfo("twoTest.js", 1234, -1, false, false, null, "twoTest.js");
    FileInfo testThree = new FileInfo("threeTest.js", 1234, -1, false, false, null, "threeTest.js");
    List<FileInfo> tests = Lists.newArrayList(testOne, testTwo, testThree);
    final JstdTestCaseFactory testCaseFactory = new JstdTestCaseFactory(
        Collections.<JstdTestCaseProcessor> emptySet(),
        Collections.<ResourceDependencyResolver>emptySet(), new NullStopWatch());

View Full Code Here

Examples of com.google.jstestdriver.FileInfo

    assertEquals(Lists.newArrayList(files), jstdTestCase.getDependencies());
  }

  public void testCreateWithOutTests() throws Exception {
    List<FileInfo> fileSet = Lists.newArrayList();
    FileInfo one = new FileInfo("one.js", 1234, -1, false, false, null, "one.js");
    FileInfo two = new FileInfo("two.js", 1234, -1, false, false, null, "two.js");
    FileInfo three = new FileInfo("three.js", 1234, -1, false, false, null, "three.js");
    FileInfo testOne = new FileInfo("oneTest.js", 1234, -1, false, false, null, "oneTest.js");
    FileInfo testTwo = new FileInfo("twoTest.js", 1234, -1, false, false, null, "twoTest.js");
    FileInfo testThree = new FileInfo("threeTest.js", 1234, -1, false, false, null, "threeTest.js");
    fileSet.add(one);
    fileSet.add(two);
    fileSet.add(three);
    fileSet.add(testOne);
    fileSet.add(testTwo);
View Full Code Here

Examples of com.google.jstestdriver.FileInfo

    assertEquals(Lists.newArrayList(fileSet), jstdTestCase.getDependencies());
  }

  public void testCreateWithOutTestsAndDeps() throws Exception {
    List<FileInfo> fileSet = Lists.newArrayList();
    FileInfo one = new FileInfo("one.js", 1234, -1, false, false, null, "one.js");
    FileInfo two = new FileInfo("two.js", 1234, -1, false, false, null, "two.js");
    FileInfo three = new FileInfo("three.js", 1234, -1, false, false, null, "three.js");
    FileInfo testOne = new FileInfo("oneTest.js", 1234, -1, false, false, null, "oneTest.js");
    FileInfo testTwo = new FileInfo("twoTest.js", 1234, -1, false, false, null, "twoTest.js");
    FileInfo testThree = new FileInfo("threeTest.js", 1234, -1, false, false, null, "threeTest.js");
    fileSet.add(one);
    fileSet.add(two);
    fileSet.add(three);
    fileSet.add(testOne);
    fileSet.add(testTwo);
View Full Code Here

Examples of com.google.jstestdriver.FileInfo

          Collections.<FileInfo>emptyList());
    assertEquals(0, testCases.size());
  }
 
  public void testUpdateTestCasesFromRunData() throws Exception {
    FileInfo plugin = new FileInfo("plugin.js", 1234, -1, false, false, null, "plugin.js");
    List<FileInfo> files = Lists.newArrayList();
    FileInfo one = new FileInfo("one.js", 1234, -1, false, false, null, "one.js");
    FileInfo two = new FileInfo("two.js", 1234, -1, false, false, null, "two.js");
    FileInfo three = new FileInfo("three.js", 1234, -1, false, false, null, "three.js");
    files.add(one);
    files.add(two);
    files.add(three);

    FileInfo testOne = new FileInfo("oneTest.js", 1234, -1, false, false, null, "oneTest.js");
    FileInfo testTwo = new FileInfo("twoTest.js", 1234, -1, false, false, null, "twoTest.js");
    FileInfo testThree = new FileInfo("threeTest.js", 1234, -1, false, false, null, "threeTest.js");
    List<FileInfo> tests = Lists.newArrayList(testOne, testTwo, testThree);
    final JstdTestCaseFactory testCaseFactory = new JstdTestCaseFactory(
        Collections.<JstdTestCaseProcessor> emptySet(),
        Collections.<ResourceDependencyResolver>emptySet(), new NullStopWatch());
View Full Code Here

Examples of com.google.jstestdriver.FileInfo

* @author corbinrsmith@gmail.com (Cory Smith)
*
*/
public class RunDataFactoryTest extends TestCase {
  public void testPreProcessFileSet() throws Exception {
    final FileInfo info = new FileInfo("foo.js", 12434, -1, false, false, null, "foo.js");
    final FileInfo addedInfo = new FileInfo("addedfoo.js", 12434, -1, false, false, null, "addedfoo.js");

    ResourcePreProcessor preProcessor = new ResourcePreProcessor(){
      public List<FileInfo> processDependencies(List<FileInfo> files) {
        files.add(addedInfo);
        return new LinkedList<FileInfo>(files);
      }

      public List<FileInfo> processPlugins(List<FileInfo> plugins) {
        return plugins;
      }

      public List<FileInfo> processTests(List<FileInfo> tests) {
        return tests;
      }
    };

    final Set<FileInfo> fileSet = Sets.newLinkedHashSet();
    fileSet.add(info);
    final RunDataFactory factory = new RunDataFactory(
      fileSet,
      Collections.<FileInfo> emptyList(),
      Sets.newHashSet(preProcessor),
      Collections.<FileInfo>emptyList(), new JstdTestCaseFactory(
          Collections.<JstdTestCaseProcessor> emptySet(),
          Collections.<ResourceDependencyResolver>emptySet(), new NullStopWatch()), new NullStopWatch());
   
    final List<FileInfo> actual = Lists.newArrayList(factory.get().getFileSet());

    assertEquals(info.getFilePath(), actual.get(0).getFilePath());
    assertEquals(info.getTimestamp(), actual.get(0).getTimestamp());
    assertEquals(info.isServeOnly(), actual.get(0).isServeOnly());

    assertEquals(addedInfo.getFilePath(), actual.get(1).getFilePath());
    assertEquals(addedInfo.getTimestamp(), actual.get(1).getTimestamp());
    assertEquals(addedInfo.isServeOnly(), actual.get(1).isServeOnly());
  }
View Full Code Here

Examples of com.google.jstestdriver.FileInfo

* @author corysmith@google.com (Cory Smith)
*
*/
public class JstdTestCaseTest extends TestCase {
  public void testApplyDelta() throws Exception {
    FileInfo fileInfoOld = new FileInfo("foo.js", 1, -1, false, false, "", "foo.js");
    FileInfo fileInfoNew = new FileInfo("foo.js", 2, -1, false, false, "", "foo.js");
    JstdTestCaseDelta delta =
        new JstdTestCaseDelta(Lists.<FileInfo>newArrayList(), Lists.<FileInfo>newArrayList(),
            Lists.newArrayList(fileInfoNew));
    JstdTestCase testCase =
        new JstdTestCase(Lists.<FileInfo>newArrayList(), Lists.<FileInfo>newArrayList(),
View Full Code Here

Examples of com.google.jstestdriver.FileInfo

    assertEquals(new JstdTestCase(Lists.<FileInfo>newArrayList(), Lists.<FileInfo>newArrayList(),
        Lists.newArrayList(fileInfoNew), null), testCase.applyDelta(delta));
  }

  public void testApplyDeltaWrongId() throws Exception {
    FileInfo fileInfoOld = new FileInfo("foo.js", 1, -1, false, false, "", "foo.js");
    FileInfo fileInfoNew = new FileInfo("foo.js", 2, -1, false, false, "", "foo.js");
    JstdTestCaseDelta delta =
      new JstdTestCaseDelta(Lists.<FileInfo>newArrayList(), Lists.<FileInfo>newArrayList(),
          Lists.newArrayList(fileInfoNew));
    JstdTestCase testCase =
      new JstdTestCase(Lists.<FileInfo>newArrayList(), Lists.<FileInfo>newArrayList(),
View Full Code Here

Examples of com.leansoft.mxjc.model.FileInfo

   */
  protected FileInfo generateFile(URL template, Object fmModel,
      String fileName, String suffix, String relativePath)
      throws WscModuleException {
    byte[] context = processTemplate(template, fmModel);
    FileInfo fileInfo = new FileInfo();
    fileInfo.setName(fileName);
    fileInfo.setPath(relativePath);
    fileInfo.setSuffix(suffix);
    fileInfo.setContent(context);
    return fileInfo;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.