def test_that_if_an_off_led_tag_without_a_named_colour_is_parsed_it_causes_one_error(self): # Arrange widget, colour_type = "LED", "off_color" root = make_widget_with_colour(widget, colour_type) # Act errors = check_specific_isis_colours(root, widget, colour_type, ["ISIS_Green_LED_Off"]) # Assert self.assertEqual(len(errors), 1)
def test_that_if_a_valid_led_tag_is_parsed_it_causes_no_errors(self): # Arrange widget, colour_type, colour = "LED", "on_color", "ISIS_Green_LED_On" root = make_widget_with_colour(widget, colour_type, colour) # Act errors = check_specific_isis_colours(root, widget, colour_type, [colour]) # Assert self.assertEqual(len(errors), 0)
def test_that_if_an_on_led_tag_with_an_incorrect_named_colour_is_parsed_it_causes_one_error(self): # Arrange widget, colour_type, colour = "LED", "on_color", "THIS IS MADE UP" root = make_widget_with_colour(widget, colour_type, colour) # Act errors = check_specific_isis_colours(root, widget, colour_type, ["ISIS_Green_LED_On"]) # Assert self.assertEqual(len(errors), 1)
def test_that_if_a_textbox_with_an_invalid_background_colour_is_parsed_it_causes_one_error(self): # Arrange widget, colour_type, colour = "TextInput", "background_color", "invalid" root = make_widget_with_colour(widget, colour_type, colour) # Act errors = check_specific_isis_colours(root, widget, colour_type, ["ISIS_Textbox_Background"]) # Assert self.assertEqual(len(errors), 1)
def test_that_if_a_textbox_with_no_named_foreground_colour_is_parsed_it_causes_one_error(self): # Arrange widget, colour_type = "TextInput", "foreground_color" root = make_widget_with_colour(widget, colour_type) # Act errors = check_specific_isis_colours(root, widget, colour_type, ["ISIS_Standard_Text"]) # Assert self.assertEqual(len(errors), 1)
def test_that_if_a_valid_led_tag_is_parsed_it_causes_no_errors(self): # Arrange widget, colour_type, colour = "LED", "on_color", "ISIS_Green_LED_On" root = make_widget_with_colour(widget, colour_type, colour) # Act errors = check_specific_isis_colours(root, widget, colour_type, [colour]) # Assert self.assertEqual(len(errors), 0)
def test_that_if_a_textbox_with_no_named_foreground_colour_is_parsed_it_causes_one_error( self): # Arrange widget, colour_type = "TextInput", "foreground_color" root = make_widget_with_colour(widget, colour_type) # Act errors = check_specific_isis_colours(root, widget, colour_type, ["ISIS_Standard_Text"]) # Assert self.assertEqual(len(errors), 1)
def test_that_if_a_textbox_with_an_invalid_background_colour_is_parsed_it_causes_one_error( self): # Arrange widget, colour_type, colour = "TextInput", "background_color", "invalid" root = make_widget_with_colour(widget, colour_type, colour) # Act errors = check_specific_isis_colours(root, widget, colour_type, ["ISIS_Textbox_Background"]) # Assert self.assertEqual(len(errors), 1)
def test_that_if_an_off_led_tag_with_an_incorrect_named_colour_is_parsed_it_causes_one_error( self): # Arrange widget, colour_type, colour = "LED", "off_color", "THIS IS MADE UP" root = make_widget_with_colour(widget, colour_type, colour) # Act errors = check_specific_isis_colours(root, widget, colour_type, ["ISIS_Green_LED_Off"]) # Assert self.assertEqual(len(errors), 1)
def test_that_if_an_on_led_tag_without_a_named_colour_is_parsed_it_causes_one_error( self): # Arrange widget, colour_type = "LED", "on_color" root = make_widget_with_colour(widget, colour_type) # Act errors = check_specific_isis_colours(root, widget, colour_type, ["ISIS_Green_LED_On"]) # Assert self.assertEqual(len(errors), 1)