public void SetUp() { _services = new ServiceContext(); var projectService = new FakeProjectService(); projectService.Add("a.nunit", "a.dll"); projectService.Add("ab.nunit", "a.dll", "b.dll"); projectService.Add("m1.nunit", MOCK_ASSEMBLY); projectService.Add("m2.nunit", MOCK_ASSEMBLY, MOCK_ASSEMBLY); projectService.Add("m3.nunit", MOCK_ASSEMBLY, MOCK_ASSEMBLY, MOCK_ASSEMBLY); projectService.Add("am.nunit", "a.dll", MOCK_ASSEMBLY); projectService.Add("mb.nunit", MOCK_ASSEMBLY, "b.dll"); projectService.Add("amb.nunit", "a.dll", MOCK_ASSEMBLY, "b.dll"); projectService.Add("mbm.nunit", MOCK_ASSEMBLY, "b.dll", MOCK_ASSEMBLY); _services.Add(new FakeExtensionService()); _services.Add(projectService); _services.Add(new TestRunnerFactory()); _services.Add(new FakeRuntimeService()); _services.Add(new TestFrameworkService()); _services.Add(new TestPackageAnalyzer()); _services.ServiceManager.StartServices(); }
public void DefaultTestRunnerFactory_ProjectServiceError() { var fake = new FakeProjectService(); fake.FailToStart = true; _services.Add(fake); var service = new RecentFilesService(); _services.Add(service); ((IService)fake).StartService(); service.StartService(); Assert.That(service.Status, Is.EqualTo(ServiceStatus.Error)); }
public void CreateService() { var projectService = new FakeProjectService(); _packageService = new PackageSettingsService(); var context = new ServiceContext(); context.Add(projectService); context.Add(_packageService); context.ServiceManager.StartServices(); }
public void DefaultTestRunnerFactory_ProjectServiceError() { var fake = new FakeProjectService(); fake.FailToStart = true; _services.Add(fake); var service = new RecentFilesService(); _services.Add(service); ((IService)fake).StartService(); service.StartService(); Assert.That(service.Status, Is.EqualTo(ServiceStatus.Error)); }
public void SetUp() { var services = new ServiceContext(); #if !NETCOREAPP1_1 services.Add(new ExtensionService()); var projectService = new FakeProjectService(); projectService.Add(TestPackageFactory.FakeProject, "a.dll", "b.dll"); services.Add(projectService); #endif _factory = new DefaultTestRunnerFactory(); services.Add(_factory); _factory.StartService(); }
public void SetUp() { _services = new ServiceContext(); var projectService = new FakeProjectService(); projectService.Add(TestPackageFactory.FakeProject, "a.dll", "b.dll"); _services.Add(new ExtensionService()); _services.Add(projectService); _services.Add(new DefaultTestRunnerFactory()); _services.Add(new FakeRuntimeService()); _services.Add(new PackageSettingsService()); _services.ServiceManager.StartServices(); }
public void SetUp() { _services = new ServiceContext(); _services.Add(new ExtensionService()); var projectService = new FakeProjectService(); ((IService)projectService).StartService(); projectService.Add(TestPackageFactory.FakeProject, "a.dll", "b.dll"); _services.Add(projectService); Assert.That(((IService)projectService).Status, Is.EqualTo(ServiceStatus.Started)); _factory = new DefaultTestRunnerFactory(); _services.Add(_factory); _factory.StartService(); Assert.That(_factory.Status, Is.EqualTo(ServiceStatus.Started)); var fakeRuntimeService = new FakeRuntimeService(); ((IService)fakeRuntimeService).StartService(); _services.Add(fakeRuntimeService); Assert.That(((IService)fakeRuntimeService).Status, Is.EqualTo(ServiceStatus.Started)); }