public async Task Basic() { var context = new ModuleTestContext <ObjectStorageModule>(); await context.UseHost(host => { // host.HasService<ObjectStorageService>(); }); }
public async Task Basic() { var context = new ModuleTestContext <ItemMetadataServerModule>(); await context.UseHost(host => { host.HasService <IItemMetadataDomain <ItemMetadataServer> >(); host.HasService <IItemMetadataDomain <object> >(); }); }
public async Task Test() { var context = new ModuleTestContext <TestModule>(); await context.UseHost(host => { host.HasModule <TestDepDepModule>(); host.HasModule <TestDepModule>(); }); await context.Run(); }
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); }); }
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); }); }