- Timestamp:
- 07/08/10 23:13:56 (15 years ago)
- Location:
- branches/HeuristicLab.Services.Authentication Prototype/UnitTests/service
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Services.Authentication Prototype/UnitTests/service/AbstractHeuristicLabServiceTest.cs
r3976 r4021 20 20 21 21 [TestCleanup()] 22 public virtualvoid closeDBConnection() {22 public override void closeDBConnection() { 23 23 sh.Close(); 24 24 base.closeDBConnection(); -
branches/HeuristicLab.Services.Authentication Prototype/UnitTests/service/HeuristicLabManagementServiceTest.cs
r4020 r4021 5 5 using Microsoft.VisualStudio.TestTools.UnitTesting; 6 6 using System.Web.Security; 7 using Service.Provider; 7 8 8 9 namespace UnitTests.service { … … 34 35 provider.CreateUser("testUser", "mypassword", "myMail", "question", "answer", true, null,out status); 35 36 Assert.AreEqual(MembershipCreateStatus.Success, status); 37 HeuristicLabRoleProvider roleProvider = new HeuristicLabRoleProvider(); 38 roleProvider.CreateRole("Admin"); 39 roleProvider.AddUsersToRoles(new String[1]{"testUser"},new String[1]{"Admin"}); 36 40 37 41 AuthorizationManagementServiceRemote.AuthorizationManagementServiceClient client = new AuthorizationManagementServiceRemote.AuthorizationManagementServiceClient(); … … 39 43 client.ClientCredentials.UserName.Password = "mypassword"; 40 44 client.CreateRole("roleName", true); 45 roleProvider.RemoveUsersFromRoles(new String[1] { "testUser" }, new String[1] { "Admin" }); 46 try { 47 client.CreateRole("roleName", true); 48 Assert.Fail(); 49 } 50 catch (Exception) { 51 //should throw exception 52 } 53 54 41 55 } 42 56
Note: See TracChangeset
for help on using the changeset viewer.