コード例 #1
0
 @Before
 public void setUp() throws Exception {
   MockitoAnnotations.initMocks(this);
   subject = new GlobalAlternativeSelector();
   subject.loadApplicationAlternatives(bbd);
   ccl = Thread.currentThread().getContextClassLoader();
   when(pat.getAnnotatedType()).thenReturn(at);
 }
コード例 #2
0
 @Test(expected = IllegalStateException.class)
 public void testLoadApplicationAlternatives_CCL_noBeansXml() throws Exception {
   final ClassLoader cl = mock(ClassLoader.class);
   Thread.currentThread().setContextClassLoader(cl);
   subject.loadApplicationAlternatives(bbd);
 }