示例#1
0
    def test_adding_x_to_x(self):
        """ Test adding 10 + 10 """
        numeral_a = Roman('x')
        numeral_b = Roman('x')

        self.assertEqual('xx', numeral_a.add(numeral_b))
        self.assertEqual('xx', numeral_b.add(numeral_a))
示例#2
0
 def test_adding_l_to_i(self):
     """ Test adding 50 + 1 """
     numeral_a = Roman('l')
     numeral_b = Roman('i')
     self.assertEqual('li', numeral_a.add(numeral_b))
     self.assertEqual('li', numeral_b.add(numeral_a))
示例#3
0
 def test_adding_xi_to_vi(self):
     """ Test adding 11 + 6 """
     numeral_a = Roman('xi')
     numeral_b = Roman('vi')
     self.assertEqual('xvii', numeral_a.add(numeral_b))
     self.assertEqual('xvii', numeral_b.add(numeral_a))