Example #1
0
 @Test
 public void testBuildTargetWithoutFlavor() {
   BuildTarget target = BuildTarget.builder(ROOT, "//foo/bar", "baz").build();
   assertEquals(target.getShortNameAndFlavorPostfix(), "baz");
   assertEquals(ImmutableSortedSet.<Flavor>of(), target.getFlavors());
   assertFalse(target.isFlavored());
 }
Example #2
0
 @Test
 public void testBuildTargetWithFlavor() {
   BuildTarget target =
       BuildTarget.builder(ROOT, "//foo/bar", "baz").addFlavors(ImmutableFlavor.of("dex")).build();
   assertEquals("baz#dex", target.getShortNameAndFlavorPostfix());
   assertEquals(ImmutableSortedSet.of(ImmutableFlavor.of("dex")), target.getFlavors());
   assertTrue(target.isFlavored());
 }