public FakeTestComponentSource(FakeComponentInstance fakeComponentInstance) { _name = fakeComponentInstance.Name; _description = fakeComponentInstance.Description; _factory = Substitute.For <TestComponentInstanceFactory>(); _componentInstance = fakeComponentInstance; _factory.Create().Returns(_componentInstance); }
public FakeTestComponentSource Add(string name) { var fakeComponentInstance = new FakeComponentInstance(name, "dummy description"); var fakeTestComponentSource = new FakeTestComponentSource(fakeComponentInstance); _componentSources.Add(fakeTestComponentSource); _componentInstances.Add(fakeComponentInstance); return(fakeTestComponentSource); }