public void SampleDataCanGetRoles() { var repo = new UsersRepositorySampleData(); var roles = repo.GetAllRoles().ToList(); Assert.AreEqual(3, roles.Count); }
public void SampleDataCanGetUserById() { var repo = new UsersRepositorySampleData(); var user = repo.GetUserById("33333333-3333-3333-3333-333333333333"); Assert.AreEqual("33333333-3333-3333-3333-333333333333", user.UserId); Assert.AreEqual("Test", user.FirstName); Assert.AreEqual("Salesuser3", user.LastName); Assert.AreEqual("*****@*****.**", user.Email); Assert.AreEqual("Sales", user.Role); Assert.AreEqual("cbe2009c-472f-4739-830f-d87368ec6ca4", user.RoleId); }
public static void SampleDataCanGetRole() { var repo = new UsersRepositorySampleData(); repo.GetRoleNameForId("cbe2009c-472f-4739-830f-d87368ec6ca4"); var roles = repo.GetAllRoles().ToList(); Assert.AreEqual(3, roles.Count); Assert.AreEqual("cbe2009c-472f-4739-830f-d87368ec6ca4", roles[1].Id); Assert.AreEqual("Sales", roles[1].Name); Assert.AreEqual("AppRole", roles[1].Discriminator); }