- Timestamp:
- 06/25/10 19:48:26 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Services.Authentication Prototype/UnitTests/HeuristicLabRoleProviderTest.cs
r3948 r3951 9 9 public class HeuristicLabRoleProviderTest : AbstractHeuristicLabTest { 10 10 private TestContext testContextInstance; 11 11 private const string TEST_ROLE_NAME = "testRole"; 12 12 /// <summary> 13 13 ///Gets or sets the test context which provides … … 69 69 70 70 /// <summary> 71 /// A test for RoleExists71 ///tests if the RoleExits method works --> test is done in a positiv and negativ way 72 72 ///</summary> 73 73 [TestMethod()] 74 74 public void RoleExistsTest() { 75 HeuristicLabRoleProvider target = new HeuristicLabRoleProvider(); // TODO: Initialize to an appropriate value 76 string roleName = string.Empty; // TODO: Initialize to an appropriate value 77 bool expected = false; // TODO: Initialize to an appropriate value 78 bool actual; 79 actual = target.RoleExists(roleName); 80 Assert.AreEqual(expected, actual); 81 Assert.Inconclusive("Verify the correctness of this test method."); 75 HeuristicLabRoleProvider target = new HeuristicLabRoleProvider(); 76 Persistence.HeuristicLabRole role = new Persistence.HeuristicLabRole(); 77 role.RoleName = TEST_ROLE_NAME; 78 Persistence.DataClassesDataContext db = Persistence.DatabaseUtil.createDataClassesDataContext(); 79 db.HeuristicLabRole.InsertOnSubmit((Persistence.HeuristicLabRole)role); 80 db.SubmitChanges(); 81 Assert.IsTrue(target.RoleExists(TEST_ROLE_NAME)); 82 Assert.IsFalse(target.RoleExists(TEST_ROLE_NAME + TEST_ROLE_NAME)); 82 83 } 83 84
Note: See TracChangeset
for help on using the changeset viewer.