Exemplo n.º 1
0
        public void Inverse_of_quarter_is_three_quarters()
        {
            var expected = new Probability(0.75m);
            var actual = new Probability(0.25m).InverseOf();

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void Either_half_or_half_is_three_quarters()
        {
            var expected = new Probability(0.75m);
            var actual = new Probability(0.5m).Either(new Probability(0.5m));

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 3
0
        public void Half_combined_with_half_is_quarter()
        {
            var expected = new Probability(0.25m);
            var actual = new Probability(0.5m).CombinedWith(new Probability(0.5m));

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 4
0
 protected bool Equals(Probability other)
 {
     return(_value == other._value);
 }