9using System.Collections.Generic;
14using Microsoft.VisualStudio.TestTools.UnitTesting;
17using TestClass = NUnit.Framework.TestFixtureAttribute;
18using TestInitialize = NUnit.Framework.SetUpAttribute;
19using TestCleanup = NUnit.Framework.TearDownAttribute;
20using TestMethod = NUnit.Framework.TestAttribute;
33 _testDIContext = TestDIContextFactory.CreateDefaultContext();
39 IDataPortal<Basic.Root> dataPortal = _testDIContext.CreateDataPortal<Basic.Root>();
42 int local = AppDomain.CurrentDomain.Id;
43 Basic.Root r = dataPortal.Create(
new Basic.Root.Criteria());
44 int remote = r.CreatedDomain;
46 if (System.Configuration.ConfigurationManager.AppSettings[
"CslaDataPortalProxy"] ==
null)
47 Assert.AreEqual(local, remote,
"Local and Remote AppDomains should be the same");
49 Assert.IsFalse((local == remote),
"Local and Remote AppDomains should be different");
void ClearContextsAfterEachTest()
void AppDomainTestIsCalled()
static void ClassInitialize(TestContext context)
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
Type to carry context information for DI in unit tests
Interface defining the members of the data portal type.