Beispiel #1
0
        public void Subtract_WithNonexistentOperator_Throws()
        {
            var x = new HasAddOperator(1);
            var y = new HasAddOperator(7);

            Assert.Throws <TypeInitializationException>(() => Operator.Subtract(x, y));
        }
Beispiel #2
0
        public void Subtract_WithNonexistentOperator_Throws()
        {
            var x = new HasAddOperator(1);
            var y = new HasAddOperator(7);

            Assert.Throws<TypeInitializationException>(() => Operator.Subtract(x, y));
        }
Beispiel #3
0
        public void Add_WithCustomAddOperator_ReturnsAddedResult()
        {
            var x = new HasAddOperator(2);
            var y = new HasAddOperator(4);

            var result = Operator.Add(x, y);

            Assert.Equal(new HasAddOperator(6), result);
        }
Beispiel #4
0
        public void Add_WithCustomAddOperator_ReturnsAddedResult()
        {
            var x = new HasAddOperator(2);
            var y = new HasAddOperator(4);

            var result = Operator.Add(x, y);

            Assert.Equal(new HasAddOperator(6), result);
        }