예제 #1
0
  @Before
  public void setUp() {
    BRJSAccessor.initialize(BRJSTestFactory.createBRJS(new File(testBase)));

    activeAliases = new ScenarioAliases();

    activeAliases.addAlias("bar", sdkFooBar);
  }
예제 #2
0
  @Test
  @Ignore
  public void verifyAliasWithNoClassReturnsNull() throws ContentProcessingException {
    activeAliases.addAlias("alias #1", new AliasDefinition(null, null, null));

    File testDir = new File(testBase, "single-alias-file/default-aspect");
    Set<String> validClasses =
        SourceFileLocator.createValidClasses(SourceFileLocator.getAllSourceFiles(testDir, null));
    AliasRegistry aliasRegistry = new AliasRegistry(testDir, null, validClasses);

    assertEquals(nullClassJson, aliasRegistry.getJson(classDictionary, activeAliases));
  }
예제 #3
0
  @Test
  @Ignore
  public void verifySingleAliasFile() throws ContentProcessingException {
    activeAliases.addAlias("alias #1", alias1);
    activeAliases.addAlias("alias #2", alias2);

    File testDir = new File(testBase, "single-alias-file/default-aspect");
    Set<String> validClasses =
        SourceFileLocator.createValidClasses(SourceFileLocator.getAllSourceFiles(testDir, null));
    AliasRegistry aliasRegistry = new AliasRegistry(testDir, null, validClasses);

    assertEquals(defaultScenarioJson, aliasRegistry.getJson(classDictionary, activeAliases));
  }
예제 #4
0
  @Test
  @Ignore
  public void verifyAliasFileCanSwitchScenario() throws ContentProcessingException {
    activeAliases.addAlias("novox.example.blade1.alias #1", group1blade1alias1test);
    activeAliases.addAlias("novox.example.blade1.alias #2", group1blade1alias2test);

    File testDir = new File(testBase, "alias-file-switching-scenario/default-aspect");
    Set<String> validClasses =
        SourceFileLocator.createValidClasses(SourceFileLocator.getAllSourceFiles(testDir, null));
    AliasRegistry aliasRegistry = new AliasRegistry(testDir, null, validClasses);

    assertEquals(testScenarioJson, aliasRegistry.getJson(classDictionary, activeAliases));
  }
예제 #5
0
  @Test
  @Ignore
  public void verifyAliasFileCanOverrideAnAliasDefinitionsFile() throws ContentProcessingException {
    activeAliases.addAlias("novox.example.blade1.alias #1", group1blade1alias1);
    activeAliases.addAlias("novox.example.blade1.alias #2", group1blade1alias2);

    File testDir =
        new File(testBase, "alias-file-overriding-an-alias-definitions-file/default-aspect");
    Set<String> validClasses =
        SourceFileLocator.createValidClasses(SourceFileLocator.getAllSourceFiles(testDir, null));
    AliasRegistry aliasRegistry = new AliasRegistry(testDir, null, validClasses);

    assertEquals(overriddenJson, aliasRegistry.getJson(classDictionary, activeAliases));
  }