Ejemplo n.º 1
0
        public void AllDrinksContainsAllAddedItems()
        {
            var expected = new Drink[] {
                new LocalDrink( "1", "", new Ingredient[ 0 ] ),
                new LocalDrink( "2", "", new Ingredient[ 0 ] )
            };
            recipes.Add( expected );

            var results = recipes.AllDrinks;

            Assert.IsTrue( expected.SequenceEqual( results ) );
        }
Ejemplo n.º 2
0
        public void FilteredDrinksContainsAllThoseWithSpecifiedIngredients()
        {
            var expected = new Drink[] {
                new LocalDrink( "1", "", new[] { new Ingredient( "a", Measurement.Tsp, 1 ) } ),
                new LocalDrink( "2", "", new[] { new Ingredient( "a", Measurement.Tsp, 1 ) } )
            };
            recipes.Add( expected );

            var results = recipes.WithIngredients( "a" );

            Assert.IsTrue( expected.SequenceEqual( results ) );
        }