Beispiel #1
0
        public void IntegerShouldSubtractBySumCorrectly(string first, string second,
                                                        string expected)
        {
            var sum = new Integer(first) + new Integer(second);

            Assert.AreEqual(expected, sum.ToString());
        }
Beispiel #2
0
        public void IntegerToStringCorrectly(string value)
        {
            var integer = new Integer(value);

            if (value.StartsWith('+'))
            {
                value = value.Substring(1);
            }
            Assert.AreEqual(value, integer.ToString());
        }
Beispiel #3
0
        public void IntegerOverLongShouldSumCorrectly(long a, long b, string expected)
        {
            var actual = new Integer(a.ToString()) + new Integer(b.ToString());

            Assert.AreEqual(expected, actual.ToString());
        }
Beispiel #4
0
        public void IntegerShouldGetRightToString(long value)
        {
            var integer = new Integer(value.ToString());

            Assert.AreEqual(value.ToString(), integer.ToString());
        }
Beispiel #5
0
        public void IntegerShouldDivCorrectly(string first, string second, string expected)
        {
            var div = new Integer(first) / new Integer(second);

            Assert.AreEqual(expected, div.ToString());
        }
Beispiel #6
0
        public void IntegerShouldSubtractCorrectly(string first, string second, string expected)
        {
            var sub = new Integer(first) - new Integer(second);

            Assert.AreEqual(sub.ToString(), expected);
        }