internal Collector GetCollectorBasedOnCollectorCreator(CollectorCreator creator) { return(new Collector { id = new CollectorSteps().LastCollectorId, nickname = creator.nickname, fearFactor = creator.fearFactor }); }
public void AddCollectorWithParameters(CollectorCreator collector) { new CollectorSteps().CreateCollector(collector); Collector expectedCollector = Transformations.GetCollectorBasedOnCollectorCreator(collector); ScenarioContext.Set(expectedCollector, ExpectedCollector); Logger.Info($"\nCollector created with the following properties. " + $"{PropertiesDescriber.GetObjectProperties(expectedCollector)}"); }
public void FindCollectorByParameters(CollectorCreator expectedCollector) { int countOfObjects = new CollectorSteps().GetListOfCollectors() .Count(collector => collector.fearFactor.Equals(expectedCollector.fearFactor) && collector.nickname.Equals(expectedCollector.nickname)); Assert.AreEqual(1, countOfObjects, $"There should be only one collector with the following properties. Actual count of such collectors is {countOfObjects}." + $"{PropertiesDescriber.GetObjectProperties(expectedCollector)}"); }