예제 #1
0
def test1():
    models = example()
    assert len(models)


    m2p = render_java.Model2Package(models, dir='.');
    m2p.run()
    mymodel = Path('java_model')
    mymodel.chdir()
    os.system('nosetests')

    Path('..').chdir()
    """if csharp_model.exists():
        csharp_model.rmtree()"""

    return models
예제 #2
0
##############################################################################
# Test on Example


def test1():
    models = example()
    assert len(models)


    m2p = render_java.Model2Package(models, dir='.');
    m2p.run()
    mymodel = Path('java_model')
    mymodel.chdir()
    os.system('nosetests')

    Path('..').chdir()
    """if csharp_model.exists():
        csharp_model.rmtree()"""

    return models


if __name__ == '__main__':
    models = example()
    assert len(models)
    m2p = render_java.Model2Package(models);
    m2p.run()
    code = m2p.code
    #exec(code)
    codetest = m2p.codetest
    #exec(codetest)
예제 #3
0
def generate_test_java(model, directory=None):
    return [render_java.Model2Package(model, directory).generate_test(model)]