# Path: bridgepoint/ooaofooa.py
# class OoaOfOoaException(Exception):
# class Domain(xtuml.MetaModel):
# class ModelLoader(xtuml.ModelLoader):
#     def __init__(self, id_generator=None):
#     def add_symbol(self, name, handle):
#     def find_symbol(self, name):
# def is_contained_in(pe_pe, root):
# def is_global(pe_pe):
# def get_defining_component(pe_pe):
# def get_attribute_type(o_attr):
# def _get_data_type_name(s_dt):
# def _get_related_attributes(r_rgo, r_rto):
# def mk_enum(s_edt):
# def mk_bridge(metamodel, s_brg):
# def mk_external_entity(metamodel, s_ee):
# def mk_function(metamodel, s_sync):
# def mk_constant(cnst_syc):
# def mk_operation(metaclass, o_tfr):
# def mk_derived_attribute(metaclass, o_dbattr):
# def mk_class(m, o_obj, derived_attributes=False):
# def mk_simple_association(m, r_simp):
# def mk_linked_association(m, r_assoc):
#     def _mk_assoc(side1, side2):
# def mk_subsuper_association(m, r_subsup):
# def mk_derived_association(m, r_comp):
# def mk_association(m, r_rel):
# def mk_component(bp_model, c_c=None, derived_attributes=False):
#     def __init__(self, load_globals=True):
#     def filename_input(self, path_or_filename):
#     def build_component(self, name=None, derived_attributes=False):
# def _mk_loader(resource, load_globals):
# def load_metamodel(resource=None, load_globals=True):
# def load_component(resource, name=None, load_globals=True):
# def delete_globals(m, disconnect=False):
#     EE = collections.namedtuple(s_ee.Key_Lett, names)


import unittest
import xtuml
    import logging
from bridgepoint import ooaofooa
# encoding: utf-8
# Copyright (C) 2017 John Törnblom
#
# This file is part of pyxtuml.
#
# pyxtuml is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, either
# version 3 of the License, or (at your option) any later version.
#
# pyxtuml is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with pyxtuml. If not, see <http://www.gnu.org/licenses/>.


class TestOoaOfOoa(unittest.TestCase):

    def test_remove_globals(self):
        m = ooaofooa.empty_model(load_globals=False)
        s = xtuml.serialize_instances(m)
        self.assertFalse(s)
        
        m = ooaofooa.empty_model(load_globals=True)
        s = xtuml.serialize_instances(m)
        self.assertTrue(s)
        

# Path: bridgepoint/ooaofooa.py
# class OoaOfOoaException(Exception):
# class Domain(xtuml.MetaModel):
# class ModelLoader(xtuml.ModelLoader):
#     def __init__(self, id_generator=None):
#     def add_symbol(self, name, handle):
#     def find_symbol(self, name):
# def is_contained_in(pe_pe, root):
# def is_global(pe_pe):
# def get_defining_component(pe_pe):
# def get_attribute_type(o_attr):
# def _get_data_type_name(s_dt):
# def _get_related_attributes(r_rgo, r_rto):
# def mk_enum(s_edt):
# def mk_bridge(metamodel, s_brg):
# def mk_external_entity(metamodel, s_ee):
# def mk_function(metamodel, s_sync):
# def mk_constant(cnst_syc):
# def mk_operation(metaclass, o_tfr):
# def mk_derived_attribute(metaclass, o_dbattr):
# def mk_class(m, o_obj, derived_attributes=False):
# def mk_simple_association(m, r_simp):
# def mk_linked_association(m, r_assoc):
#     def _mk_assoc(side1, side2):
# def mk_subsuper_association(m, r_subsup):
# def mk_derived_association(m, r_comp):
# def mk_association(m, r_rel):
# def mk_component(bp_model, c_c=None, derived_attributes=False):
#     def __init__(self, load_globals=True):
#     def filename_input(self, path_or_filename):
#     def build_component(self, name=None, derived_attributes=False):
# def _mk_loader(resource, load_globals):
# def load_metamodel(resource=None, load_globals=True):
# def load_component(resource, name=None, load_globals=True):
# def delete_globals(m, disconnect=False):
#     EE = collections.namedtuple(s_ee.Key_Lett, names)


# Path: tests/test_bridgepoint/test_ooaofooa.py
import unittest
import xtuml
    import logging
from bridgepoint import ooaofooa

# encoding: utf-8
# Copyright (C) 2017 John Törnblom
#
# This file is part of pyxtuml.
#
# pyxtuml is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, either
# version 3 of the License, or (at your option) any later version.
#
# pyxtuml is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with pyxtuml. If not, see <http://www.gnu.org/licenses/>.


class TestOoaOfOoa(unittest.TestCase):

    def test_remove_globals(self):
        m = ooaofooa.empty_model(load_globals=False)
        s = xtuml.serialize_instances(m)
        self.assertFalse(s)
        
        m = ooaofooa.empty_model(load_globals=True)
        s = xtuml.serialize_instances(m)
        self.assertTrue(s)
        

        ooaofooa.delete_globals(m)