コード例 #1
0
        public void CreatePartial()
        {
            // Arrange
            var repository = Substitute.For <IDrinkRepository>();
            var mapper     = Substitute.For <IMapper>();
            var controller = new DrinkController(repository, mapper);

            // Act
            var result   = controller.CreatePartial() as PartialViewResult;
            var viewName = result.ViewName;

            //Assert
            Assert.That(result, !Is.Null);
            Assert.That("_CreatePartial", Is.EqualTo(viewName));
        }