コード例 #1
0
        public void UpdateQuality()
        {
            var qualityUpdateStrategyFactory = new QualityUpdateStrategyFactory();

            foreach (var item in items)
            {
                qualityUpdateStrategyFactory.Create(item).UpdateQuality();
            }
        }
コード例 #2
0
        public void Create_ReturnsProperStrategyForItem(string itemName, Type expectedType)
        {
            var item = new Item {
                Name = itemName
            };
            var subject = new QualityUpdateStrategyFactory();

            var result = subject.Create(item);

            Assert.That(result, Is.TypeOf(expectedType));
        }