Beispiel #1
0
        public void When_Add_Constraint_Number_Of_Products_Is_Appropriate_Less()
        {
            var packetFactory = new PacketBuilder()
                                .AddProducts(_products);
            var oldProductCount = packetFactory.GetProductsCount();

            packetFactory.AddPacketConstraint(p => p.Id <= 1);
            var newProductCount = packetFactory.GetProductsCount();
            var differenceCount = oldProductCount - newProductCount;

            Assert.AreEqual(2, differenceCount);
        }