public void CoordinatorDeclarativeWithAttributes()
        {
            ITestCoordinator coord = ctx["testCoordinator"] as ITestCoordinator;
            TestObjectDao    dao   = (TestObjectDao)ctx["testObjectDao"];

            TransactionTemplateTests.PerformOperations(coord, dao);
        }
        public static void PerformOperations(ITestCoordinator coordinator, ITestObjectDao dao)
        {
            TestObject to1 = new TestObject();
            to1.Name = "Jack";
            to1.Age = 7;
            TestObject to2 = new TestObject();
            to2.Name = "Jill";
            to2.Age = 8;

            coordinator.WorkOn(to1, to2);

            coordinator.TestObjectManager.DeleteTwoTestObjects("Jack", "Jill");
        }
Esempio n. 3
0
        public static void PerformOperations(ITestCoordinator coordinator, ITestObjectDao dao)
        {
            TestObject to1 = new TestObject();

            to1.Name = "Jack";
            to1.Age  = 7;
            TestObject to2 = new TestObject();

            to2.Name = "Jill";
            to2.Age  = 8;

            coordinator.WorkOn(to1, to2);

            coordinator.TestObjectManager.DeleteTwoTestObjects("Jack", "Jill");
        }
Esempio n. 4
0
 public HomeController(ITestCoordinator TestServ)
 {
     TestService = TestServ;
 }