public void GivenCostCenterCategory_WhenDeriving_ThenPostBuildRelationsMustExist() { var costCenterCategory = new CostCenterCategoryBuilder(this.Session) .WithDescription("CostCenterCategory") .Build(); Assert.True(costCenterCategory.ExistUniqueId); }
public void GivenCostCenterCategory_WhenDeriving_ThenPostBuildRelationsMustExist() { var costCenterCategory = new CostCenterCategoryBuilder(this.DatabaseSession) .WithDescription("CostCenterCategory") .Build(); Assert.IsTrue(costCenterCategory.ExistUniqueId); }
public void GivenCostCenterCategory_WhenDeriving_ThenRequiredRelationsMustExist() { var builder = new CostCenterCategoryBuilder(this.DatabaseSession); builder.Build(); Assert.IsTrue(this.DatabaseSession.Derive().HasErrors); this.DatabaseSession.Rollback(); builder.WithDescription("CostCenterCategory"); builder.Build(); Assert.IsFalse(this.DatabaseSession.Derive().HasErrors); }
public void GivenCostCenterCategory_WhenDeriving_ThenRequiredRelationsMustExist() { var builder = new CostCenterCategoryBuilder(this.Session); builder.Build(); Assert.True(this.Session.Derive(false).HasErrors); this.Session.Rollback(); builder.WithDescription("CostCenterCategory"); builder.Build(); Assert.False(this.Session.Derive(false).HasErrors); }