예제 #1
0
 public async Task Basic()
 {
     var context = new ModuleTestContext <ObjectStorageModule>();
     await context.UseHost(host =>
     {
         // host.HasService<ObjectStorageService>();
     });
 }
예제 #2
0
 public async Task Basic()
 {
     var context = new ModuleTestContext <ItemMetadataServerModule>();
     await context.UseHost(host =>
     {
         host.HasService <IItemMetadataDomain <ItemMetadataServer> >();
         host.HasService <IItemMetadataDomain <object> >();
     });
 }
예제 #3
0
        public async Task Test()
        {
            var context = new ModuleTestContext <TestModule>();
            await context.UseHost(host =>
            {
                host.HasModule <TestDepDepModule>();
                host.HasModule <TestDepModule>();
            });

            await context.Run();
        }
예제 #4
0
 public async Task Test()
 {
     var context = new ModuleTestContext <TestModule>();
     await context.UseHost(host =>
     {
         var module = host.EnsureGetService <TestModule>();
         Assert.AreEqual(TestModule.ManifestString, module.Manifest.Author);
         Assert.AreEqual(TestModule.ManifestString, module.Manifest.Description);
         Assert.AreEqual(TestModule.ManifestString, module.Manifest.DisplayName);
         Assert.AreEqual(TestModule.ManifestString, module.Manifest.Url);
         Assert.AreEqual(TestModule.ManifestString, module.Manifest.Version);
         Assert.AreEqual(TestModule.ManifestString, module.Manifest.Name);
     });
 }
예제 #5
0
        public async Task Test()
        {
            var context = new ModuleTestContext <TestModule>();
            await context.UseHost(host =>
            {
                var module = host.EnsureGetService <TestModule>();
                Assert.IsFalse(module.HasInitialized);
                Assert.IsFalse(module.HasShutdowned);
            });

            await context.Run(host =>
            {
                var module = host.EnsureGetLoadedModule <TestModule>();
                Assert.IsTrue(module.HasInitialized);
                Assert.IsFalse(module.HasShutdowned);
            });
        }