Exemplo n.º 1
0
        public void AddCategory_OneRecipe_CategoryAddedToJoinTable()
        {
            //Arrange
            Recipe testRecipe = new Recipe("Pot Pie", "Microwave it");

            testRecipe.Save();
            Category testCategory = new Category("Peasant");

            testCategory.Save();
            testRecipe.AddCategory(testCategory);

            //Act
            List <Category> output = testRecipe.GetCategory();
            List <Category> verify = new List <Category> {
                testCategory
            };

            //Assert
            Assert.Equal(verify, output);
        }