public static void Setup(TestContext context)
        {
            _mockRepository = new Mock<IRepository<string>>();
            _mockRepository.Setup(x => x.Get(It.IsAny<int>())).Returns("This works");
            _realService = new SampleService(_mockRepository.Object);

            _controller = new HomeController(_realService);
        }
        public void Contact()
        {
            // Arrange
            _mockService.Setup(x => x.GetMessage(It.IsAny<int>())).Returns("This works as well!");
            var controller = new HomeController(_mockService.Object);

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

            // Assert
            _mockService.Verify(x => x.GetMessage(3), Times.Once());
            Assert.IsNotNull(result);
            Assert.AreEqual("This works as well!", result.ViewBag.Message);
        }