public async Task AddPreparationWhenModelIsNullResultInvalidModelRepeatPage()
            {
                //Arrange
                var mok = new Mock <IStreinger>();

                var controller = new preparation.Controllers.SupplierController(mok.Object, null, null);
                //act
                var actual = await controller.AddPreparation(null, null);

                //assert
                var view = Assert.IsAssignableFrom <ViewResult>(actual);

                Assert.Null(view.ViewData.Model);
                Assert.True(view.ViewData.ModelState.ErrorCount > 0);
            }
            public async Task AddPreparationWhenModelInvalidResultInvalidModelRepeatPage()
            {
                //Arrange
                var prep = new AddPreparationViewModel("", "", "", "", "");

                var mok = new Mock <IStreinger>();

                var controller = new preparation.Controllers.SupplierController(mok.Object, null, null);
                //act
                var actual = await controller.AddPreparation(prep);

                //assert
                var view = Assert.IsAssignableFrom <ViewResult>(actual);

                Assert.NotNull(view.ViewData.Model);
                Assert.IsType <AddPreparationViewModel>(view.ViewData.Model);
            }
            public async Task AddPreparationWhenModelValidResultRedirectToAction()
            {
                //Arrange
                var prep = new AddPreparationViewModel("1", "2", "3", "4", "5");

                var mok = new Mock <IStreinger>();

                mok.Setup(e => e.AddPreparationAsync(It.IsAny <Preparation>()))
                .ReturnsAsync(true);
                //var mokManager = FakeTestingService.MockUserManager(new List<User>());
                //var mokSupplierContext = new Mock<SuppliersContext>(DammyOptions);

                var controller = new preparation.Controllers.SupplierController(mok.Object, null, null);
                //act
                var actual = await controller.AddPreparation(prep);

                //assert
                var view = Assert.IsAssignableFrom <RedirectToActionResult>(actual);

                Assert.Equal("СhangeProduct", view.ActionName);
            }