Пример #1
0
        public void CommandGenerator_Generate_Delete_Recipe_Command_Succeeds()
        {
            var generator = new CommandGenerator(_mockRepository.Object);
            var command   = generator
                            .For(new Recipe
            {
                Id            = 1,
                TimeToPrepare = 1.5,
                Title         = "Test title",
                Description   = "Test descriptoin"
            })
                            .ThatWill(CommandType.Delete);

            Assert.IsNotNull(command);
            Assert.IsInstanceOfType(command, typeof(DeleteRecipeCommand));
        }