예제 #1
0
 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)));
 }
예제 #4
0
 public ComponentBasedTestToolDriver()
 {
     _instanceFactory   = Substitute.For <TestComponentInstanceFactory>();
     ComponentInstances = new FakeComponentInstances(_fakeComponentInstances);
     ComponentsSetup    = new FakeTestComponents(_fakeComponentInstances);
 }
예제 #5
0
 public void Add(string name, string description, TestComponentInstanceFactory instanceFactory)
 {
     TestComponents.Add(
         _testComponentViewModelFactory.Create(name, description, instanceFactory)
         );
 }