public FakeTestComponentSource(FakeComponentInstance fakeComponentInstance) { _name = fakeComponentInstance.Name; _description = fakeComponentInstance.Description; _factory = Substitute.For <TestComponentInstanceFactory>(); _componentInstance = fakeComponentInstance; _factory.Create().Returns(_componentInstance); }
public ComponentInstanceViewModelFactory( TestComponentInstanceFactory componentInstanceFactory, OutputFactory outputFactory, OperationViewModelFactory operationViewModelFactory, BackgroundTasks backgroundTasks, OperationMachinesByControlObject operationMachinesByControlObject, ApplicationEvents applicationEvents) { _componentInstanceFactory = componentInstanceFactory; _outputFactory = outputFactory; _operationViewModelFactory = operationViewModelFactory; _backgroundTasks = backgroundTasks; _operationMachinesByControlObject = operationMachinesByControlObject; _applicationEvents = applicationEvents; }
public TestComponentViewModel Create(string name, string description, TestComponentInstanceFactory instanceFactory) { return(new TestComponentViewModel( name, description, _componentInstancesViewModel, new ComponentInstanceViewModelFactory( instanceFactory, _outputFactory, _operationViewModelFactory, _backgroundTasks, _operationMachinesByControlObject, _applicationEvents))); }
public ComponentBasedTestToolDriver() { _instanceFactory = Substitute.For <TestComponentInstanceFactory>(); ComponentInstances = new FakeComponentInstances(_fakeComponentInstances); ComponentsSetup = new FakeTestComponents(_fakeComponentInstances); }
public void Add(string name, string description, TestComponentInstanceFactory instanceFactory) { TestComponents.Add( _testComponentViewModelFactory.Create(name, description, instanceFactory) ); }