/** * @description An example of a test library * @author Joanna Chimiak-Opoka */ library testlib metamodel uml require ocl.deflib private tests model models.new_file.uml /** * @description * compares a variable with a value */ test variablevalue: let testresult : Integer = 3 expected testresult < 5 /** * @description * compares two variables */ test variablevariable: let testresult : Integer = example_variable in let testexpectedresult : Integer = 100 expected testresult = testexpectedresult /** * @description * tests number of attributes for C1 class */ test numberOfAttributesC1: let testresult : Integer = getClassByName('C1').numberOfAttributes() expected testresult = 0 /** * @description * tests number of attributes for C2 class */ test numberOfAttributesC2: let testresult : Integer = getClassByName('C2').numberOfAttributes() expected testresult = 2 endtests endlibrary