public void GivenThreshold_WhenDeriving_ThenRequiredRelationsMustExist() { var builder = new ThresholdBuilder(this.Session); var threshold = builder.Build(); Assert.True(this.Session.Derive(false).HasErrors); this.Session.Rollback(); builder.WithDescription("Threshold"); threshold = builder.Build(); Assert.True(this.Session.Derive(false).HasErrors); builder.WithTermType(new OrderTermTypes(this.Session).NonReturnableSalesItem); threshold = builder.Build(); Assert.False(this.Session.Derive(false).HasErrors); threshold.RemoveDescription(); Assert.False(this.Session.Derive(false).HasErrors); }
public void GivenThreshold_WhenDeriving_ThenRequiredRelationsMustExist() { var builder = new ThresholdBuilder(this.DatabaseSession); var threshold = builder.Build(); Assert.IsTrue(this.DatabaseSession.Derive().HasErrors); this.DatabaseSession.Rollback(); builder.WithDescription("Threshold"); threshold = builder.Build(); Assert.IsFalse(this.DatabaseSession.Derive().HasErrors); builder.WithTermType(new TermTypes(this.DatabaseSession).NonReturnableSalesItem); threshold = builder.Build(); Assert.IsFalse(this.DatabaseSession.Derive().HasErrors); threshold.RemoveDescription(); Assert.IsFalse(this.DatabaseSession.Derive().HasErrors); }