public static FakeTestComponent GetByName(string componentName, ComponentsViewModel componentsViewModel) { var testComponentViewModel = componentsViewModel .TestComponents .First(c => c.Name.StartsWith(componentName)); var fakeTestComponent = new FakeTestComponent(testComponentViewModel); return(fakeTestComponent); }
public void AddInstanceOf(string componentName) { var fakeTestComponent = FakeTestComponent.GetByName(componentName, _componentsViewModel); fakeTestComponent.AddInstance(); }