public void ConstructorSetsPropertiesForAll() { var context = new FixedIncomeHighProfitJudgementContext( this.fixedIncomeHighProfitJudgement, true, this.ruleBreachContext, this.fixedIncomeParameters, null, "currency-1", 100.2m, true, false, this.profitBreakdown); Assert.IsTrue(context.RaiseRuleViolation); Assert.AreEqual(this.fixedIncomeHighProfitJudgement, context.Judgement); Assert.AreEqual("currency-1", context.AbsoluteProfitCurrency); Assert.AreEqual(null, context.AbsoluteProfits); Assert.AreEqual(this.fixedIncomeParameters, context.FixedIncomeParameters); Assert.AreEqual(this.profitBreakdown, context.ExchangeRateProfits); Assert.AreEqual(true, context.HasAbsoluteProfitBreach); Assert.AreEqual(false, context.HasRelativeProfitBreach); Assert.AreEqual(true, context.RaiseRuleViolation); Assert.AreEqual(100.2m, context.RelativeProfits); Assert.AreEqual(this.ruleBreachContext, context.RuleBreachContext); }
public void ConstructorPropertiesSetForJudgementAndRuleViolation() { var context = new FixedIncomeHighProfitJudgementContext(this.fixedIncomeHighProfitJudgement, true); Assert.IsTrue(context.RaiseRuleViolation); Assert.AreEqual(this.fixedIncomeHighProfitJudgement, context.Judgement); }