public void Controller_TestAuthorize_NotHavingRights_Test() { var testUser = new User("test", "123456", Roles.User); var testController = new TestController(testUser); testController.TestAuthorize(Roles.VenueAdmin); }
public void Repository_GetWithId_ExistingItem_Test() { var repository = new Repository<IDatabaseEntity>(); var allUsers = new List<User>(); for (var i = 0; i < 10; i++) { var user = new User("username" + i, "password" + i, Roles.User); allUsers.Add(user); repository.Add(user); } var expectedValue = repository.GetElementById(2); Assert.AreEqual(expectedValue, allUsers[1]); }
public MyProfile(User user) : base(user) { }
public Register(User user) : base(user) { }