示例#1
0
        public void Test_ChildDataPortal_Params()
        {
            _ = ArrayDataPortalClass.GetChildParams(1, 2, 3);
            Assert.AreEqual("FetchChild(int[] values)", ApplicationContext.GlobalContext["Method"]);

            _ = ArrayDataPortalClass.GetChildParams("a", "b", "c");
            Assert.AreEqual("FetchChild(string[] values)", ApplicationContext.GlobalContext["Method"]);
        }
示例#2
0
        public void Test_ChildDataPortal_Array()
        {
            _ = ArrayDataPortalClass.GetChild(new int[] { 1, 2, 3 });
            Assert.AreEqual("FetchChild(int[] values)", ApplicationContext.GlobalContext["Method"]);

            _ = ArrayDataPortalClass.GetChild(new string[] { "a", "b", "c" });
            Assert.AreEqual("FetchChild(string[] values)", ApplicationContext.GlobalContext["Method"]);
        }
示例#3
0
        public void Test_DataPortal_Params()
        {
            IDataPortal <ArrayDataPortalClass> dataPortal = _testDIContext.CreateDataPortal <ArrayDataPortalClass>();

            TestResults.Reinitialise();
            _ = ArrayDataPortalClass.GetParams(dataPortal, 1, 2, 3);
            Assert.AreEqual("Fetch(int[] values)", TestResults.GetResult("Method"));

            TestResults.Reinitialise();
            _ = ArrayDataPortalClass.GetParams(dataPortal, "a", "b", "c");
            Assert.AreEqual("Fetch(string[] values)", TestResults.GetResult("Method"));
        }
示例#4
0
        public void Test_ChildDataPortal_Array()
        {
            IChildDataPortal <ArrayDataPortalClass> childDataPortal = _testDIContext.CreateChildDataPortal <ArrayDataPortalClass>();

            TestResults.Reinitialise();
            _ = ArrayDataPortalClass.GetChild(childDataPortal, new int[] { 1, 2, 3 });
            Assert.AreEqual("FetchChild(int[] values)", TestResults.GetResult("Method"));

            TestResults.Reinitialise();
            _ = ArrayDataPortalClass.GetChild(childDataPortal, new string[] { "a", "b", "c" });
            Assert.AreEqual("FetchChild(string[] values)", TestResults.GetResult("Method"));
        }
示例#5
0
 public void Test_DataPortal_String_Null()
 {
     try
     {
         _ = ArrayDataPortalClass.Get(default(string[]));
     }
     catch (DataPortalException ex)
     {
         if (ex.InnerException != null)
         {
             throw ex.InnerException;
         }
         else
         {
             throw ex;
         }
     }
 }
示例#6
0
        public void Test_DataPortal_String_Null()
        {
            IDataPortal <ArrayDataPortalClass> dataPortal = _testDIContext.CreateDataPortal <ArrayDataPortalClass>();

            TestResults.Reinitialise();

            try
            {
                _ = ArrayDataPortalClass.Get(dataPortal, default(string[]));
            }
            catch (DataPortalException ex)
            {
                if (ex.InnerException != null)
                {
                    throw ex.InnerException;
                }
                else
                {
                    throw ex;
                }
            }
        }
示例#7
0
 public void Test_DataPortal_String_Null()
 {
     _ = ArrayDataPortalClass.Get(default(string[]));
 }
示例#8
0
 public void Test_DataPortal_Int_Null()
 {
     _ = ArrayDataPortalClass.Get(default(int[]));
 }