public void T16() { // Arrange var validator = new TradeDetailsValidator(); // Act validator.UpdateExcursionLimits(Direction.Long, Option.None <double>(), 200.00); // Assert Assert.Equal(0, validator.MinimumHigh); }
public void T17() { // Arrange var validator = new TradeDetailsValidator(); const double testOpen = 200; // Act validator.UpdateExcursionLimits(Direction.Long, Option.Some(350.00), testOpen); // Assert Assert.Equal(testOpen, validator.MaximumLow); }
public void T12() { // Arrange var validator = new TradeDetailsValidator(); validator.UpdateExcursionLimits(Direction.Long, Option.Some(200.00), 100); // Act validator.ValidateLow(Option.Some(101.00)); // Assert Assert.True(validator.LowHasError); }
public void T8() { // Arrange var validator = new TradeDetailsValidator(); validator.UpdateExcursionLimits(Direction.Long, Option.Some(100.00), 200); // Act validator.ValidateHigh(Option.Some(199.00)); // Assert Assert.True(validator.HighHasError); }
public void T13() { // Arrange var validator = new TradeDetailsValidator(); validator.UpdateExcursionLimits(Direction.Long, new Option.OptionSome <double>(200), 100); validator.LowHasError = true; // Act validator.ValidateLow(Option.Some(99.00)); // Assert Assert.False(validator.HighHasError); }