public void InitializeData( ) { AclManagerBase manager = MockAclManager( ); List <AclEntry> entries = new List <AclEntry>( ); entries.Add(new AclEntry("Res", "Action", "U.User", Value.Grant)); entries.Add(new AclEntry("Res", "Action", "G.Group", Value.Deny)); manager.InitializeData(entries.ToArray( )); Assert.AreEqual(2, manager.TotalEntries, "Wrong entry count"); AclEntry[] allEntries = manager.RetrieveAllEntries( ); Assert.AreEqual(2, allEntries.Length, "Wrong entry count"); Array.Sort(allEntries, (x, y) => x.Subject.CompareTo(y.Subject)); AssertAclEntriesAreEqual(new AclEntry("Res", "Action", "G.Group", Value.Deny), allEntries[0]); AssertAclEntriesAreEqual(new AclEntry("Res", "Action", "U.User", Value.Grant), allEntries[1]); }
public void InitializeData_NullData( ) { AclManagerBase manager = MockAclManager( ); manager.InitializeData(null); }