Beispiel #1
0
        public async Task CanCreateLeisureOnStep()
        {
            //Arrange
            TestTrekStoriesContext tc         = new TestTrekStoriesContext();
            ActivitiesController   controller = new ActivitiesController(tc);
            Step step = new Step()
            {
                StepId = 2
            };

            tc.Steps.Add(step);
            // Act
            var result = await controller.CreateLeisure(2) as ViewResult;

            // Assert
            Assert.AreEqual("EditLeisure", result.ViewName);
            Assert.AreEqual(2, result.ViewBag.StepId);
        }