예제 #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
파일: ArrayTests.cs 프로젝트: gnilesh4/csla
        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
파일: ArrayTests.cs 프로젝트: gnilesh4/csla
        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
파일: ArrayTests.cs 프로젝트: mlivensp/csla
 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
파일: ArrayTests.cs 프로젝트: gnilesh4/csla
        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[]));
 }