public void ShowMeTheCode_DeveriaRetornarJsonResult()
        {
            // Arrange
            var showMeTheCodeController = new ShowMeTheCodeController();

            // Act
            var jsonResult = showMeTheCodeController.ShowMeTheCode();

            // Assert
            Assert.IsType <JsonResult>(jsonResult);;
        }
Beispiel #2
0
        public void ShowMeTheCodeControllerRetornarUrlsGit()
        {
            var mockAplicShowMeTheCode = new Mock <IAplicShowMeTheCode>();

            var urls = new UrlDTO()
            {
                UrlGitTaxaJuros = "url1",
                UrlGitCalcJuros = "url2"
            };

            mockAplicShowMeTheCode.Setup(p => p.ShowMeTheCode()).Returns(urls);
            var controller = new ShowMeTheCodeController(mockAplicShowMeTheCode.Object);
            var retUrls    = controller.ShowMeTheCode();

            Assert.Equal(urls.UrlGitTaxaJuros, retUrls.UrlGitTaxaJuros);
            Assert.Equal(urls.UrlGitCalcJuros, retUrls.UrlGitCalcJuros);
        }