Beispiel #1
0
        public void MapReturnsFizzBuzzForNumberDividableByFifteen(int number, string expectedResult)
        {
            //arrange
            var mappingStrategies            = new IMappingStrategy[] { new DividableByThreeMappingStrategy(), new DividableByFiveMappingStrategy() };
            IMappingStrategy mappingStrategy = new CompositeMappingStrategy(mappingStrategies);

            //act
            string result = mappingStrategy.Map(number);

            //assert
            Assert.Equal(expectedResult, result);
        }
Beispiel #2
0
        public void MapReturnsNumber(int number, string expectedResult)
        {
            //arrange
            var mappingStrategies            = new IMappingStrategy[] { };
            IMappingStrategy mappingStrategy = new CompositeMappingStrategy(mappingStrategies);

            //act
            string result = mappingStrategy.Map(number);

            //assert
            Assert.Equal(expectedResult, result);
        }