Esempio n. 1
0
 internal Collector GetCollectorBasedOnCollectorCreator(CollectorCreator creator)
 {
     return(new Collector
     {
         id = new CollectorSteps().LastCollectorId,
         nickname = creator.nickname,
         fearFactor = creator.fearFactor
     });
 }
Esempio n. 2
0
        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)}");
        }
Esempio n. 3
0
        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)}");
        }