예제 #1
0
 public void Init()
 {
     _store = new SuplexStore();
     _dal   = new MemoryDal(_store);
     so     = new SecureObject {
         UniqueName = "top"
     };
     _dal.UpsertSecureObject(so);
 }
예제 #2
0
        public void UpsertSecureObject()
        {
            SecureObject child = new SecureObject()
            {
                UniqueName = "child"
            };
            ISecureObject top = _dal.GetSecureObjectByUniqueName(so.UniqueName);

            child.ParentUId = top.UId;
            _dal.UpsertSecureObject(child);

            ISecureObject found = _dal.GetSecureObjectByUniqueName(child.UniqueName);

            Assert.IsNotNull(found);
            bool eq = child.UniqueName.Equals(found.UniqueName);

            Assert.IsTrue(eq);
        }