public void Constructor_Always_SetsRuleToPassedInValue() { // Arrange InOutRule expectedRule = InOutRule.Open; // Act Turn subject = new Turn(expectedRule); // Assert Assert.AreEqual(expectedRule, subject.Rule, "Rule was not the expected value"); }
public void RuleProperty_Always_ReturnsWhatWasPassedIntoConstructor() { // Arrange InOutRule expectedRule = InOutRule.Open; // Act OutCalculator subject = new OutCalculator(expectedRule); // Assert Assert.AreEqual(expectedRule, subject.Rule, "Rule was not the expected value"); }
/// <summary> /// Creates an instance of the OutCalculator /// </summary> /// <param name="outRule">Indicates the out rule to use to determine appropriate outs</param> public OutCalculator(InOutRule outRule) { Rule = outRule; }
/// <summary> /// Constructor to allow for setting of the InOutRule during initialization. /// </summary> /// <param name="rule">The Out rule to follow for calculations.</param> public Turn(InOutRule rule) { Rule = rule; }