Esempio n. 1
0
    public void AddCompartment()
    {
        var name = "London";
        var existingCompartment = new ShoppingOrder(new ArticleGroup("Vegetables"), 30);
        var compartments        = new Collection <ShoppingOrder> {
            existingCompartment
        };
        var compartmentToAdd = new ShoppingOrder(new ArticleGroup("Vegetables"), 40);
        var testee           = new Store(name, compartments);

        testee.AddCompartment(compartmentToAdd);

        testee.Compartments.Should().BeEquivalentTo(new [] { existingCompartment, compartmentToAdd });
    }