def test_given_module_name_with_invalid_separators_then_exception_raised_with_correct_message(
            self):

        with self.assertRaises(ParsingError) as e:
            get_mc.get_module_creator_ioc("test_UI_module")

        self.assertTrue("test_UI_module" in str(e.exception))
    def test_given_module_name_slash_separated_with_fullname_false_and_module_path_in_remote_repo_then_module_creator_add_to_module_returned_with_correct_args_used(self):

        self.mock_is_server_repo.return_value = True

        new_ioc_creator = get_mc.get_module_creator_ioc("test/module/02", fullname=False)

        self.assertEqual(new_ioc_creator, "ModuleCreatorAddApp")
        self.mock_is_server_repo.assert_called_once_with(self.git_root_dir+"/ioc/test/module")
        self.mock_nmc_add_app.assert_called_once_with("test/module", "ioc", self.mt_mocks['IOC'], app_name="test-module-IOC-02")
    def test_given_module_name_slash_separated_then_module_creator_with_apps_returned_with_correct_args_used(
            self):

        new_ioc_bl_creator = get_mc.get_module_creator_ioc("test/BL")

        self.assertEqual(new_ioc_bl_creator, "ModuleCreatorWithApps")
        self.mock_nmc_with_apps.assert_called_once_with("test/BL",
                                                        "ioc",
                                                        self.mt_mocks['IOCBL'],
                                                        app_name="test",
                                                        domain="test",
                                                        technical_area="BL",
                                                        ioc_number="01")
    def test_given_module_name_dash_separated_then_module_creator_with_apps_returned_with_correct_args_used(self):

        new_ioc_bl_creator = get_mc.get_module_creator_ioc("test-BL-IOC-01", "ioc")

        self.assertEqual(new_ioc_bl_creator, "ModuleCreatorWithApps")
        self.mock_nmc_with_apps.assert_called_once_with("test/test-BL-IOC-01", "ioc", self.mt_mocks['IOCBL'], app_name="test-BL-IOC-01")
    def test_given_module_name_with_invalid_separators_then_exception_raised_with_correct_message(self):

        with self.assertRaises(ParsingError) as e:
            get_mc.get_module_creator_ioc("test_BL_module")

        self.assertTrue("test_BL_module" in str(e.exception))
    def test_given_module_name_slash_separated_with_fullname_true_but_no_ioc_number_then_module_creator_with_apps_returned_with_correct_args_used(self):

        new_ioc_creator = get_mc.get_module_creator_ioc("test/module", fullname=True)

        self.assertEqual(new_ioc_creator, "ModuleCreatorWithApps")
        self.mock_nmc_with_apps.assert_called_once_with("test/test-module-IOC-01", "ioc", self.mt_mocks['IOC'], app_name="test-module-IOC-01")
    def test_given_module_name_slash_separated_and_more_than_one_slash_raises_exception(
            self):

        with self.assertRaises(ParsingError):
            get_mc.get_module_creator_ioc("test/module/02")
    def test_given_module_name_without_domain_raises_exception(self):

        with self.assertRaises(ParsingError) as e:
            get_mc.get_module_creator_ioc("test-module-IOC-01")

        self.assertTrue("test/test-module-IOC-01" in str(e.exception))