コード例 #1
0
        public void IncrementRevision()
        {
            DatabaseFixtures dbFixtures = new DatabaseFixtures();

            dbFixtures.CreateEmptyDomain();

            var oldValue = ClientTransaction.CreateRootTransaction().QueryManager.GetScalar(Revision.GetGetRevisionQuery(new RevisionKey()));

            ClientTransaction.CreateRootTransaction().QueryManager.GetScalar(Revision.GetIncrementRevisionQuery(new RevisionKey()));

            var newValue = ClientTransaction.CreateRootTransaction().QueryManager.GetScalar(Revision.GetGetRevisionQuery(new RevisionKey()));

            Assert.That(oldValue, Is.Not.EqualTo(newValue));
        }
コード例 #2
0
        public void Saving_DisacardedDomainObject()
        {
            Tenant tenant = _factory.CreateTenant();

            tenant.Delete();

            ClientTransactionScope.CurrentTransaction.Commit();

            Assert.That(ClientTransaction.CreateRootTransaction().QueryManager.GetScalar(Revision.GetGetRevisionQuery(new RevisionKey())), Is.Null);
        }
コード例 #3
0
        public void GetRevision()
        {
            DatabaseFixtures dbFixtures = new DatabaseFixtures();

            dbFixtures.CreateEmptyDomain();

            Assert.That(ClientTransaction.CreateRootTransaction().QueryManager.GetScalar(Revision.GetGetRevisionQuery(new RevisionKey())), Is.Null);
        }
コード例 #4
0
        public void Saving_OneSecurityManagerDomainObject()
        {
            Dev.Null = _factory.CreateTenant();

            ClientTransactionScope.CurrentTransaction.Commit();

            var value = ClientTransaction.CreateRootTransaction().QueryManager.GetScalar(Revision.GetGetRevisionQuery(new RevisionKey()));

            Assert.That(value, Is.InstanceOf <Guid>());
            Assert.That(value, Is.Not.EqualTo(Guid.Empty));
        }