public void Check_If_TestWebUserRepository_Returns_Role_Rights_Against_A_Test_User() { // Arrange IWebUserRepository _Repository = new TestWebUserRepository(); //Act var userInfo = _Repository.GetUserInfo(1); //Assert Assert.IsNotNull(userInfo.VisibleReports); }
public void Check_If_TestWebUserRepository_Returns_Correct_Role_Against_A_Test_User() { // Arrange IWebUserRepository _Repository = new TestWebUserRepository(); //Act var userInfo = _Repository.GetUserInfo(1); //Assert Assert.AreEqual("Student", userInfo.Role); }
public void Check_If_TestWebUserService_Returns_Role_Rights_Against_TestWebUserRepository() { // Arrange IWebUserRepository userRepository = new TestWebUserRepository(); var testLogService = new TestLogService(); IWebUserService _Repository = new WebUserService(userRepository, testLogService); //Act var studentUserInfo = _Repository.GetUserInfo(1); var adminUserInfo = _Repository.GetUserInfo(3); //Assert Assert.AreEqual("Student", studentUserInfo.Role); Assert.AreEqual("Admin", adminUserInfo.Role); }