Ejemplo n.º 1
0
        public void Edit_WhenCalled_ReturnTopicInViewModel()
        {
            var topic = _context.AddTestTopicToDatabase();

            var result = _controller.Edit(topic.Id);

            Assert.That(((result as ViewResult).Model as TopicFormViewModel).Topic.Id, Is.EqualTo(topic.Id));
        }
Ejemplo n.º 2
0
        public void Edit_WhenCalled_ReturnViewResult()
        {
            var result = _controller.Edit(_topic1.Id);

            Assert.That(result, Is.TypeOf <ViewResult>());
        }