コード例 #1
0
 @Before
 public void setUp() throws Exception {
   when(foo.locate(FOO + "." + BAR)).thenReturn(fooResulution);
   when(bar.locate(BAR)).thenReturn(barResolution);
   Map<String, ClassFileLocator> map = new HashMap<String, ClassFileLocator>();
   map.put(FOO, foo);
   map.put(NamedElement.EMPTY_NAME, bar);
   classFileLocator = new ClassFileLocator.PackageDiscriminating(map);
 }
コード例 #2
0
 @Test
 public void testInvalidLocation() throws Exception {
   assertThat(classFileLocator.locate(BAR + "." + FOO).isResolved(), is(false));
 }
コード例 #3
0
 @Test
 public void testValidLocationDefaultPackage() throws Exception {
   assertThat(classFileLocator.locate(BAR), is(barResolution));
 }
コード例 #4
0
 @Test
 public void testValidLocation() throws Exception {
   assertThat(classFileLocator.locate(FOO + "." + BAR), is(fooResulution));
 }