2using System.Collections.Generic;
4using System.Reflection;
6using System.Threading.Tasks;
8using Microsoft.VisualStudio.TestTools.UnitTesting;
20 _testDIContext = TestDIContextFactory.CreateDefaultContext();
52 [ExpectedException(typeof(AmbiguousMatchException))]
64 if (ex.InnerException !=
null)
65 throw ex.InnerException;
72 [ExpectedException(typeof(AmbiguousMatchException))]
84 if (ex.InnerException !=
null)
85 throw ex.InnerException;
128 return dataPortal.
Fetch(values);
133 return dataPortal.
Fetch(values);
138 return dataPortal.
Fetch(values);
143 return dataPortal.
Fetch(values);
167 private void Fetch(
int[] values)
173 private void Fetch(
string[] values)
179 private void FetchChild(
int[] values)
181 TestResults.Add(
"Method",
"FetchChild(int[] values)");
185 private void FetchChild(
string[] values)
187 TestResults.Add(
"Method",
"FetchChild(string[] values)");
This is the base class from which most business objects will be derived.
This exception is returned for any errors occurring during the server-side DataPortal invocation.
static ArrayDataPortalClass GetParams(IDataPortal< ArrayDataPortalClass > dataPortal, params string[] values)
static ArrayDataPortalClass GetChildParams(IChildDataPortal< ArrayDataPortalClass > dataPortal, params int[] values)
static ArrayDataPortalClass GetChildParams(IChildDataPortal< ArrayDataPortalClass > dataPortal, params string[] values)
static ArrayDataPortalClass Get(IDataPortal< ArrayDataPortalClass > dataPortal, int[] values)
static ArrayDataPortalClass Get(IDataPortal< ArrayDataPortalClass > dataPortal, string[] values)
static ArrayDataPortalClass GetChild(IChildDataPortal< ArrayDataPortalClass > dataPortal, int[] values)
static ArrayDataPortalClass GetParams(IDataPortal< ArrayDataPortalClass > dataPortal, params int[] values)
static ArrayDataPortalClass GetChild(IChildDataPortal< ArrayDataPortalClass > dataPortal, string[] values)
void Test_DataPortal_Params()
static void ClassInitialize(TestContext context)
void Test_ChildDataPortal_Params()
void Test_DataPortal_Array()
void Test_ChildDataPortal_Array()
void Test_DataPortal_Int_Null()
void Test_DataPortal_String_Null()
Static dictionary-like class that offers similar functionality to GlobalContext This is used in tests...
static void Reinitialise()
Reinitialise the dictionary, clearing any existing results, ready for the next test
static string GetResult(string key)
Get a result of an operation from the underlying results dictionary
static void Add(string key, string value)
Add an item to the test results, to indicate an outcome of a particular operation
Type to carry context information for DI in unit tests
Interface defining the members of the child data portal type.
object FetchChild(params object[] criteria)
Called by a factory method in a business class to retrieve an object, which is loaded with values fro...
Interface defining the members of the data portal type.
object Fetch(params object[] criteria)
Called by a factory method in a business class to retrieve an object, which is loaded with values fro...
@ Serializable
Prevents updating or inserting until the transaction is complete.