Permalink
Browse files

Added welcomemodel test and related test updates

  • Loading branch information...
ehelin committed Jun 17, 2018
1 parent 35e35c0 commit a6f4244725f4ca0c8f111a8588ea546e94ed4469
@@ -17,6 +17,11 @@ public void TestWelcomeControllerIndex()
Assert.IsNotNull(view);
Assert.IsNotNull(view.Model);
WelcomeModel model = (WelcomeModel)view.Model;
Assert.IsNotNull(model.DashboardData);
Assert.IsTrue(model.DashboardData.Length > 0);
}
}
}
@@ -0,0 +1,21 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TgimbaNetCoreWeb.Controllers;
using TgimbaNetCoreWeb.Models;
using Microsoft.AspNetCore.Mvc;
namespace TestTgimbaNetCoreWeb
{
[TestClass]
public class WelcomeModelTest : BaseTest
{
[TestMethod]
public void TestWelcomeModel()
{
WelcomeModel welcomeModel = new WelcomeModel(this.mockITgimbaService.Object);
Assert.IsNotNull(welcomeModel);
Assert.IsNotNull(welcomeModel.DashboardData);
Assert.IsTrue(welcomeModel.DashboardData.Length > 0);
}
}
}
@@ -14,10 +14,10 @@ public IActionResult Index()
return View();
}
public IActionResult Error()
{
ViewData["RequestId"] = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
return View();
}
//public IActionResult Error()
//{
// ViewData["RequestId"] = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
// return View();
//}
}
}
@@ -100,13 +100,15 @@
This is also a work in progress that is allowing me to explore different technologies and how they
can be applied to the Internet. There are no warranties (implied or otherwise) and everyone is free
to use it as is.
</p>
</p>
<p>
Please click <a id="login" href="http://localhost:50298/Home/Index">here</a>
Please click <a id="login" href="https://www.tgimba.com/Home/Index">here</a>
to start.
</p> @*
<p>
Login as the demo user to preview the application functionality <a id="demoLogin" href="http://www.tgimba.com/WebRequest/DirectRequestDemoUser">here.</a>
</p>*@
</div>

0 comments on commit a6f4244

Please sign in to comment.