Beispiel #1
0
 @Test
 public void testBuildTargetTwoLevelsDeep() {
   BuildTarget rootTarget = BuildTarget.builder(ROOT, "//java/com/facebook", "fb4a").build();
   assertEquals("fb4a", rootTarget.getShortNameAndFlavorPostfix());
   assertEquals("//java/com/facebook", rootTarget.getBaseName());
   assertEquals("//java/com/facebook/", rootTarget.getBaseNameWithSlash());
   assertEquals(Paths.get("java/com/facebook"), rootTarget.getBasePath());
   assertEquals("java/com/facebook/", rootTarget.getBasePathWithSlash());
   assertEquals("//java/com/facebook:fb4a", rootTarget.getFullyQualifiedName());
   assertEquals("//java/com/facebook:fb4a", rootTarget.toString());
 }
Beispiel #2
0
 @Test
 public void testRootBuildTarget() {
   BuildTarget rootTarget = BuildTarget.builder(ROOT, "//", "fb4a").build();
   assertEquals("fb4a", rootTarget.getShortNameAndFlavorPostfix());
   assertEquals("//", rootTarget.getBaseName());
   assertEquals("//", rootTarget.getBaseNameWithSlash());
   assertEquals(Paths.get(""), rootTarget.getBasePath());
   assertEquals("", rootTarget.getBasePathWithSlash());
   assertEquals("//:fb4a", rootTarget.getFullyQualifiedName());
   assertEquals("//:fb4a", rootTarget.toString());
 }