public void FormatResultMessage_Updated()
        {
            // arrange
            var iut = new AdminMenuItemController(null);
            var item = new MenuItem
            {
                Id = 42,
            };

            // act
            iut.FormatResultMessage(item, 42);

            // assert
            var actual = iut.TempData["SaveResult"];
            Assert.AreEqual("Items was successfully updated", actual);
        }
        public void FormatResultMessage_Updated()
        {
            // arrange
            var serviceFactory = new TestServiceFactory
            {
                MenuService = new MenuServiceMole
                {
                    SaveMenuItem = i => { },
                },
            };
            var iut = new AdminMenuItemController(serviceFactory);
            var item = new MenuItem
            {
                Id = 42,
            };
            var formCollection = new FormCollection();

            // act - EditMenuItem eventually calls FormatResultMessage
            iut.EditMenuItem(42, item, formCollection);

            // assert
            var actual = iut.TempData["SaveResult"];
            Assert.AreEqual("Items was successfully updated", actual);
        }