def __write_test_no_new_transition(self, utest_file_descriptor, prepared_list):

        utest_file_descriptor.write("void test_NoTransistionAdded(void)\n"
                                    "{\n"
                                    "    uint8_t expectedValidTransitionNumber = " + str(len(prepared_list)) + ", actualNumber = 0;\n"
                                    "    " + state_type(self._sm_name) + " tableLine;\n"
                                    "    Transition_t actualTransition;\n\n")

        utest_file_descriptor.write("    for (" + state_enum_type(self._sm_name) + " i = " + self._priv_state_name_list[0] +
                                    "; i < " + sm_state_common(self._sm_name) + "END; i++)\n")

        utest_file_descriptor.write("    {\n"
                                    "        for ( " + condition_enum_type(self._sm_name) + " j = " +
                                    self._priv_condi_name_list[0] + "; j < " +
                                    sm_condition_common(self._sm_name) + "END; j++)\n")
        utest_file_descriptor.write("        {\n"
                                    "            tableLine = " + transition_table_name(self._sm_name) + "[i];\n"
                                    "            actualTransition = tableLine.transition[j];\n"
                                    "            if ( true == actualTransition.isTransitionValid )\n"
                                    "            {\n"
                                    "                actualNumber++;\n"
                                    "            }\n"
                                    "        }\n"
                                    "    }\n"
                                    "\n"
                                    "    TEST_ASSERT_EQUAL(expectedValidTransitionNumber, actualNumber);\n"
                                    "}\n\n")
    def __create_enumeration(self, file_descriptor):
        list_nr = len(self._priv_state_name_list)
        file_descriptor.write("typedef enum{\n")
        for i in range(0, list_nr):
            file_descriptor.write("    " + self._priv_state_name_list[i] + ",\n")
        file_descriptor.write("    " + sm_state_common(self._sm_name) + "END,\n")
        file_descriptor.write("}" + state_enum_type(self._sm_name) + ";\n\n")

        list_nr = len(self._priv_condi_name_list)
        file_descriptor.write("typedef enum{\n")
        none_condition_exist = False
        condition_none_name = sm_condition_common(self._sm_name) + "NONE"
        for i in range(0, list_nr):
            if condition_none_name in self._priv_condi_name_list[i]:
                none_condition_exist = True
                break;
        if none_condition_exist is False:
            self._priv_condi_name_list.insert(0, condition_none_name)
        for i in range(0, list_nr):
            file_descriptor.write("    " + self._priv_condi_name_list[i] + ",\n")
        file_descriptor.write("    " + sm_condition_common(self._sm_name) + "END,\n")
        file_descriptor.write("}" + condition_enum_type(self._sm_name) + ";\n\n")
    def __create_enumeration(self, file_descriptor):
        list_nr = len(self._priv_state_name_list)
        file_descriptor.write("typedef enum{\n")
        for i in range(0, list_nr):
            file_descriptor.write("    " + self._priv_state_name_list[i] + ",\n")
        file_descriptor.write("    " + sm_state_common(self._sm_name) + "END,\n")
        file_descriptor.write("}" + state_enum_type(self._sm_name) + ";\n\n")

        list_nr = len(self._priv_condi_name_list)
        file_descriptor.write("typedef enum{\n")
        for i in range(0, list_nr):
            file_descriptor.write("    " + self._priv_condi_name_list[i] + ",\n")
        file_descriptor.write("    " + sm_condition_common(self._sm_name) + "END,\n")
        file_descriptor.write("}" + condition_enum_type(self._sm_name) + ";\n\n")
    def __write_test_enum_change(self, utest_file_descriptor):
        utest_file_descriptor.write("void test_EnumNotChange(void)\n{\n")

        list_nr = len(self._priv_state_name_list)
        for i in range(0, list_nr):
            utest_file_descriptor.write("    TEST_ASSERT_EQUAL(" + str(i) + ", " +
                                        self._priv_state_name_list[i] + ");\n")
        utest_file_descriptor.write("    TEST_ASSERT_EQUAL(" + str(list_nr) + ", " +
                                    sm_state_common(self._sm_name) + "END);\n\n")
        list_nr = len(self._priv_condi_name_list)
        for i in range(0, list_nr):
            utest_file_descriptor.write("    TEST_ASSERT_EQUAL(" + str(i) + ", " +
                                        self._priv_condi_name_list[i] + ");\n")
        utest_file_descriptor.write("    TEST_ASSERT_EQUAL(" + str(list_nr) + ", " +
                                    sm_condition_common(self._sm_name) + "END);\n")

        utest_file_descriptor.write("}\n\n")
    def __write_test_table_size(self, utest_file_descriptor):
        condition_end_name = sm_condition_common(self._sm_name) + "END"
        state_end_name = sm_state_common(self._sm_name) + "END"

        utest_file_descriptor.write("void test_LineSizeNotChange(void)\n"
                                    "{\n"
                                    "    uint32_t expectedSize = " + condition_end_name + " * sizeof(Transition_t);\n"
                                    "\n"
                                    "    TEST_ASSERT_EQUAL(expectedSize, sizeof(" + state_type(self._sm_name) + "));\n"
                                    "}\n"
                                    "\n"
                                    "void test_TableSizeNotChange(void)\n"
                                    "{\n"
                                    "    uint32_t expectedSize = " + condition_end_name +
                                    " * sizeof(Transition_t) *" + state_end_name + ";\n"
                                    "\n"
                                    "    TEST_ASSERT_EQUAL(expectedSize, sizeof(" + transition_table_name(self._sm_name) + "));\n"
                                    "}\n\n")
 def __create_transition_table_line_type(self, file_descriptor):
     file_descriptor.write("typedef struct{\n")
     file_descriptor.write("    Transition_t transition[" +
                           sm_condition_common(self._sm_name) + "END" + "];\n")
     file_descriptor.write("}" + state_type(self._sm_name) + ";\n")
     file_descriptor.write("\n")