Exemplo n.º 1
0
 def setUp(self):
     self.mod = Modifier()
Exemplo n.º 2
0
class TestModifier(unittest.TestCase):
    
    def setUp(self):
        self.mod = Modifier()
        
    def test_turn_on_disable(self):
        self.mod.turn_on_disable()
        self.assertTrue(self.mod.is_disable)
        
    def test_turn_off_disable(self):
        self.mod.turn_off_disable()
        self.assertFalse(self.mod.is_disable)
    
    def test_turn_on_show_only(self):
        self.mod.turn_on_show_only()
        self.assertTrue(self.mod.is_show_only)
        
    def test_turn_off_show_only(self):
        self.mod.turn_off_show_only()
        self.assertFalse(self.mod.is_show_only)
    
    def test_turn_on_debug(self):
        self.mod.turn_on_debug()
        self.assertTrue(self.mod.is_debug)
        
    def test_turn_off_debug(self):
        self.mod.turn_off_debug()
        self.assertFalse(self.mod.is_debug)
    
    def test_turn_on_transparent(self):
        self.mod.turn_on_transparent()
        self.assertTrue(self.mod.is_transparent)
        
    def test_turn_off_transparent(self):
        self.mod.turn_off_transparent()
        self.assertFalse(self.mod.is_transparent)

    def test_get_prefix(self):
        mod = Modifier()
        self.assertEqual(mod.get_prefix(), "")

        mod.turn_on_disable()
        self.assertEqual(mod.get_prefix(), "*")

        mod.turn_on_show_only()
        self.assertEqual(mod.get_prefix(), "*!")

        mod.turn_on_debug()
        self.assertEqual(mod.get_prefix(), "*!#")

        mod.turn_on_transparent()
        self.assertEqual(mod.get_prefix(), "*!#%")
Exemplo n.º 3
0
    def test_get_prefix(self):
        mod = Modifier()
        self.assertEqual(mod.get_prefix(), "")

        mod.turn_on_disable()
        self.assertEqual(mod.get_prefix(), "*")

        mod.turn_on_show_only()
        self.assertEqual(mod.get_prefix(), "*!")

        mod.turn_on_debug()
        self.assertEqual(mod.get_prefix(), "*!#")

        mod.turn_on_transparent()
        self.assertEqual(mod.get_prefix(), "*!#%")
Exemplo n.º 4
0
 def setUp(self):
     self.mod = Modifier()
Exemplo n.º 5
0
class TestModifier(unittest.TestCase):
    def setUp(self):
        self.mod = Modifier()

    def test_turn_on_disable(self):
        self.mod.turn_on_disable()
        self.assertTrue(self.mod.is_disable)

    def test_turn_off_disable(self):
        self.mod.turn_off_disable()
        self.assertFalse(self.mod.is_disable)

    def test_turn_on_show_only(self):
        self.mod.turn_on_show_only()
        self.assertTrue(self.mod.is_show_only)

    def test_turn_off_show_only(self):
        self.mod.turn_off_show_only()
        self.assertFalse(self.mod.is_show_only)

    def test_turn_on_debug(self):
        self.mod.turn_on_debug()
        self.assertTrue(self.mod.is_debug)

    def test_turn_off_debug(self):
        self.mod.turn_off_debug()
        self.assertFalse(self.mod.is_debug)

    def test_turn_on_transparent(self):
        self.mod.turn_on_transparent()
        self.assertTrue(self.mod.is_transparent)

    def test_turn_off_transparent(self):
        self.mod.turn_off_transparent()
        self.assertFalse(self.mod.is_transparent)

    def test_get_prefix(self):
        mod = Modifier()
        self.assertEqual(mod.get_prefix(), "")

        mod.turn_on_disable()
        self.assertEqual(mod.get_prefix(), "*")

        mod.turn_on_show_only()
        self.assertEqual(mod.get_prefix(), "*!")

        mod.turn_on_debug()
        self.assertEqual(mod.get_prefix(), "*!#")

        mod.turn_on_transparent()
        self.assertEqual(mod.get_prefix(), "*!#%")
Exemplo n.º 6
0
    def test_get_prefix(self):
        mod = Modifier()
        self.assertEqual(mod.get_prefix(), "")

        mod.turn_on_disable()
        self.assertEqual(mod.get_prefix(), "*")

        mod.turn_on_show_only()
        self.assertEqual(mod.get_prefix(), "*!")

        mod.turn_on_debug()
        self.assertEqual(mod.get_prefix(), "*!#")

        mod.turn_on_transparent()
        self.assertEqual(mod.get_prefix(), "*!#%")