コード例 #1
0
 public void Should_be_in_a_unit_of_work() {
     var current = new StubUnitOfWork();
     using(UnitOfWork.RegisterGlobalUnitOfWork(current)) {
         UnitOfWork.Start();
         Assert.IsTrue(UnitOfWork.IsStarted);
         Assert.AreEqual(current, UnitOfWork.Current);
     }
 }
コード例 #2
0
 public void Should_be_to_get_the_current_unit_of_work()
 {
     using (UnitOfWork.RegisterGlobalUnitOfWork(new StubUnitOfWork()))
     {
         IUnitOfWork stub = new StubUnitOfWork();
         UnitOfWork.RegisterGlobalUnitOfWork(stub);
         UnitOfWork.Start();
         Assert.AreEqual(stub, UnitOfWork.Current);
     }
 }
コード例 #3
0
        public void Should_be_in_a_unit_of_work()
        {
            var current = new StubUnitOfWork();

            using (UnitOfWork.RegisterGlobalUnitOfWork(current)) {
                UnitOfWork.Start();
                Assert.IsTrue(UnitOfWork.IsStarted);
                Assert.AreEqual(current, UnitOfWork.Current);
            }
        }
コード例 #4
0
 public void Should_be_to_get_the_current_unit_of_work()
 {
     using (UnitOfWork.RegisterGlobalUnitOfWork(new StubUnitOfWork()))
     {
         IUnitOfWork stub = new StubUnitOfWork();
         UnitOfWork.RegisterGlobalUnitOfWork(stub);
         UnitOfWork.Start();
         Assert.AreEqual(stub, UnitOfWork.Current);
     }
 }