Changeset 3974 for branches/HeuristicLab.Services.Authentication Prototype/UnitTests/HeuristicLabRoleProviderTest.cs
- Timestamp:
- 06/28/10 21:09:36 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Services.Authentication Prototype/UnitTests/HeuristicLabRoleProviderTest.cs
r3967 r3974 3 3 using System.Linq; 4 4 using System.Collections.Generic; 5 using System.Data.SqlClient; 5 6 namespace UnitTests { 6 7 /// <summary> … … 325 326 Assert.IsNotNull(target); 326 327 } 328 [TestMethod()] 329 public void NoDuplicateRoleTest() { 330 try { 331 Persistence.HeuristicLabRole role = new Persistence.HeuristicLabRole(); 332 role.RoleName ="role1"; 333 Persistence.HeuristicLabRole role1 = new Persistence.HeuristicLabRole(); 334 role1.RoleName ="role1"; 335 db.HeuristicLabRole.InsertOnSubmit(role); 336 db.HeuristicLabRole.InsertOnSubmit(role1); 337 db.SubmitChanges(); 338 Assert.Fail(); 339 } 340 catch (SqlException) { 341 //swallowing Exception because it is expected that a SQL Exception is thrown 342 } 343 } 327 344 } 328 345 346 347 329 348 330 349
Note: See TracChangeset
for help on using the changeset viewer.