public void Either_1_and_1_equals_1() { var p1 = new Probability(1m); var p2 = new Probability(1m); Assert.AreEqual(new Probability(1m), p1.Either(p2)); Assert.AreEqual(new Probability(1m), p2.Either(p1)); }
public void Either_0_25_and_0_75_equals_0_8125() { var p1 = new Probability(0.25m); var p2 = new Probability(0.75m); Assert.AreEqual(new Probability(0.8125m), p1.Either(p2)); Assert.AreEqual(new Probability(0.8125m), p2.Either(p1)); }
public void Either_including_0_probability_equals_other_value() { var p0 = new Probability(0m); var p050 = new Probability(0.5m); var p1 = new Probability(1m); Assert.AreEqual(new Probability(1m), p0.Either(p1)); Assert.AreEqual(new Probability(1m), p1.Either(p0)); Assert.AreEqual(new Probability(0.5m), p0.Either(p050)); Assert.AreEqual(new Probability(0.5m), p050.Either(p0)); }