コード例 #1
0
            public void Should_return_true_for_matching_item()
            {
                var subject   = new FlatXPercentOff("item-1", 0.15m);
                var orderItem = new OrderItem {
                    Identifier = "item-1", ItemCost = 50m, Quantity = 10
                };

                Assert.IsTrue(subject.MatchesItem(orderItem));
            }
コード例 #2
0
            public void Should_not_match_when_order_is_null()
            {
                var subject = new FlatXPercentOff("item-1", 0.3m);

                Assert.IsFalse(subject.MatchesItem(null));
            }