Inheritance: Controller
        public void Index()
        {
            // Arrange
            var digipostServiceMock = new Mock<IDigipostService>();
            var controller = new SendController(digipostServiceMock.Object);
            var person = TestHelper.GetSearchDetailsResult().PersonDetails[0];
            var sendModel = Converter.SearchDetailsToSendModel(person);

            // Act
            var result = controller.Index(sendModel) as ViewResult;

            // Assert
            Assert.IsNotNull(result);
            Assert.AreEqual("Index", result.ViewName);
            Assert.AreEqual(result.Model, sendModel);
        }
 private static SendController SendControllerWithMockedRequestContext(SearchDetails person)
 {
     var digipostServiceMock = new Mock<IDigipostService>();
     var controller = new SendController(digipostServiceMock.Object);
     var mockedRequestContext = MockedRequestContextWithSessionState(person);
     controller.ControllerContext = new ControllerContext(mockedRequestContext, controller);
     return controller;
 }
 private static SendController SendControllerWithMockedDigipostServiceAndRequestFile()
 {
     var mockedDigipostService = MockedDigipostService();
     var controller = new SendController(mockedDigipostService.Object);
     var mockedRequestContext = MockedRequestContext();
     controller.ControllerContext = new ControllerContext(mockedRequestContext, controller);
     return controller;
 }