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)); }
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); }
public void GetRevision() { DatabaseFixtures dbFixtures = new DatabaseFixtures(); dbFixtures.CreateEmptyDomain(); Assert.That(ClientTransaction.CreateRootTransaction().QueryManager.GetScalar(Revision.GetGetRevisionQuery(new RevisionKey())), Is.Null); }
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)); }