public void ReturnProperView() { var cityServiceMock = new Mock <ICityService>(); var addressServiceMock = new Mock <IAddressService>(); var controller = new AddressController(cityServiceMock.Object, addressServiceMock.Object); var result = controller.GetAddressesByCompanyId(1) as ViewResult; Assert.AreEqual("Index", result.ViewName); }