Beispiel #1
0
        public void Delete()
        {
            IDataPortal <Root> dataPortal = _testDIContext.CreateDataPortal <Root>();

            TestResults.Reinitialise();

            dataPortal.Delete("abc");

            Assert.AreEqual("Delete", TestResults.GetResult("ObjectFactory"), "Data should match");
        }
Beispiel #2
0
        public void FailDeleteContext()
        {
            IDataPortal <ExceptionRoot> dataPortal = _testDIContext.CreateDataPortal <ExceptionRoot>();

            TestResults.Reinitialise();

            ExceptionRoot root = null;

            try
            {
                dataPortal.Delete("fail");
                Assert.Fail("Exception didn't occur");
            }
            catch (DataPortalException ex)
            {
                root = (ExceptionRoot)ex.BusinessObject;
                Assert.AreEqual("Fail delete", ex.GetBaseException().Message, "Base exception message incorrect");
                Assert.IsTrue(ex.Message.StartsWith("DataPortal.Delete failed"), "Exception message incorrect");
            }
            Assert.IsNull(root, "Business object returned");
            Assert.AreEqual("create", TestResults.GetResult("create"), "GlobalContext not preserved");
        }
Beispiel #3
0
        private void DeleteLegacy(int id)
        {
            IDataPortal <Legacy> dataPortal = _testDIContext.CreateDataPortal <Legacy>();

            dataPortal.Delete(new Legacy.Criteria(id));
        }
Beispiel #4
0
        private void DeleteSingle(int id)
        {
            IDataPortal <Single> dataPortal = _testDIContext.CreateDataPortal <Single>();

            dataPortal.Delete(id);
        }
Beispiel #5
0
 public static void DeleteStronglyTypedDP(int id, IDataPortal <StronglyTypedDP> dataPortal)
 {
     dataPortal.Delete(new Criteria(id));
 }
Beispiel #6
0
 public static void DeleteNullableObject(string name, IDataPortal <NullableObject> dataPortal)
 {
     dataPortal.Delete(new Criteria(name));
 }
Beispiel #7
0
        private void DeleteRoot(string data)
        {
            IDataPortal <Basic.Root> dataPortal = _testDIContext.CreateDataPortal <Basic.Root>();

            dataPortal.Delete(new Basic.Root.Criteria(data));
        }
Beispiel #8
0
 public static void DeleteRoot(string data, IDataPortal <RollbackRoot> dataPortal)
 {
     dataPortal.Delete(new Criteria(data));
 }
Beispiel #9
0
        private void DeleteLegacySplit(int id)
        {
            IDataPortal <LegacySplit> dataPortal = _testDIContext.CreateDataPortal <LegacySplit>();

            dataPortal.Delete(new LegacySplitBase <LegacySplit> .Criteria(id));
        }
Beispiel #10
0
 public static void DeleteObject(int id, IDataPortal <SingleOverload> dataPortal)
 {
     dataPortal.Delete(new Criteria(id));
 }
Beispiel #11
0
 public static void DeleteObject(int id, IDataPortal <T> dataPortal)
 {
     dataPortal.Delete(new Criteria(id));
 }
Beispiel #12
0
 public static void DeleteTransactionalRoot(int ID, IDataPortal <TransactionalRoot> dataPortal)
 {
     dataPortal.Delete(new Criteria(ID));
 }
Beispiel #13
0
 public static void DeleteParentEntity(int ID, IDataPortal <ParentEntity> dataPortal)
 {
     dataPortal.Delete(new Criteria(ID));
 }