예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void whenContextCallsLoaderBlocksServicesFolderShouldLoadClassFromKernelClassloader()
        internal virtual void WhenContextCallsLoaderBlocksServicesFolderShouldLoadClassFromKernelClassloader()
        {
            Thread.CurrentThread.ContextClassLoader = new ServiceBlockClassLoader(_contextClassLoader);
            FooService fooService = Service.Load(typeof(FooService), "foo");

            assertTrue(fooService is BarService);
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void whenContextClassLoaderOverridesServiceShouldLoadThatClass()
        internal virtual void WhenContextClassLoaderOverridesServiceShouldLoadThatClass()
        {
            Thread.CurrentThread.ContextClassLoader = new ServiceRedirectClassLoader(_contextClassLoader);
            FooService fooService = Service.Load(typeof(FooService), "foo");

            assertTrue(fooService is BazService);
        }
예제 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void shouldLoadServiceInDefaultEnvironment()
        internal virtual void ShouldLoadServiceInDefaultEnvironment()
        {
            FooService fooService = Service.Load(typeof(FooService), "foo");

            assertTrue(fooService is BarService);
        }