Ejemplo n.º 1
0
        public void NegationZero()
        {
            Number negate   = new Number(0);
            int    expected = 0;

            Negation negation = new Negation(negate);
            decimal  actual   = negation.Operation();

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void NegationNegativeRealNumber()
        {
            Number  negate   = new Number(-10.5m);
            decimal expected = 10.5m;

            Negation negation = new Negation(negate);
            decimal  actual   = negation.Operation();

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 3
0
        public void NegationPositiveRealNumber()
        {
            Number negate   = new Number(10.5);
            double expected = -10.5;

            Negation negation = new Negation(negate);
            double   actual   = negation.Operation();

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 4
0
        public void NegationNegativeInteger()
        {
            Number negate   = new Number(-10m);
            int    expected = 10;

            Negation negation = new Negation(negate);
            decimal  actual   = negation.Operation();

            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 5
0
        public void NegationPositiveInteger()
        {
            Number negate   = new Number(10);
            int    expected = -10;

            Negation negation = new Negation(negate);
            double   actual   = negation.Operation();

            Assert.AreEqual(expected, actual);
        }