Exemple #1
0
 public FakeTestComponentSource(FakeComponentInstance fakeComponentInstance)
 {
     _name              = fakeComponentInstance.Name;
     _description       = fakeComponentInstance.Description;
     _factory           = Substitute.For <TestComponentInstanceFactory>();
     _componentInstance = fakeComponentInstance;
     _factory.Create().Returns(_componentInstance);
 }
Exemple #2
0
        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);
        }