Exemplo n.º 1
0
    def test_bad_id_10(self):
        # Setup
        test_name = "Bad ID Validator Test #10"
        data_to_test = "\n"
        class_to_test = vid.ValidateEmpId()
        expected_result = ["", False]

        # Action & Assert
        self.run_test(expected_result, test_name, class_to_test, data_to_test)
Exemplo n.º 2
0
    def test_perfect_id_05(self):
        # Setup
        test_name = "Good ID Validator Test #5"
        data_to_test = "$*#(%*)   (*()  A 2 01  $ &^*&^*&^((**\n"
        class_to_test = vid.ValidateEmpId()
        expected_result = ["A201", True]

        # Action & Assert
        self.run_test(expected_result, test_name, class_to_test, data_to_test)
Exemplo n.º 3
0
    def test_bad_id_06(self):
        # Setup
        test_name = "Bad ID Validator Test #6"
        data_to_test = "A111, Z333"
        class_to_test = vid.ValidateEmpId()
        expected_result = ["A111Z333", False]

        # Action & Assert
        self.run_test(expected_result, test_name, class_to_test, data_to_test)
Exemplo n.º 4
0
    def test_perfect_id_04(self):
        # Setup
        test_name = "Good ID Validator Test #4"
        data_to_test = "$A201$"
        class_to_test = vid.ValidateEmpId()
        expected_result = ["A201", True]

        # Action & Assert
        self.run_test(expected_result, test_name, class_to_test, data_to_test)
Exemplo n.º 5
0
    def test_bad_id_09(self):
        # Setup
        test_name = "Bad ID Validator Test #9"
        data_to_test = "#*()*#)FSAJLKSAJLKDJSL#*$()*()@)*A@*()" \
                       "SAF*)(*)A#$JKLJALKFSJ:LKAS*$(UWQAIJASFD"
        class_to_test = vid.ValidateEmpId()
        expected_result = [
            "Fsajlksajlkdjslasafajkljalkf"
            "sjlkasuwqaijasfd", False
        ]

        # Action & Assert
        self.run_test(expected_result, test_name, class_to_test, data_to_test)