Example #1
0
 def test_parse_a_declaration_with_an_object_value(self):
     self.assertEquals(Object("MyAnnotation",[Field("Value",Object("MyValue"))]), annotations.parse("MyAnnotation(Value=@MyValue())"))
Example #2
0
 def test_parse_a_declaration_with_many_value(self):
     self.assertEquals(Object("MyAnnotation",[Field("Five",Literal("5")),Field("Six",Literal("\"VI\""))]), annotations.parse("MyAnnotation(Five=5,Six=\"VI\")"))
Example #3
0
 def test_parse_a_simple_declaration(self):
     self.assertEquals(Object("MyAnnotation"), annotations.parse("MyAnnotation()"))
Example #4
0
 def test_parse_a_declaration_with_a_value(self):
     self.assertEquals(Object("MyAnnotation",[Field("Five",Literal("5"))]), annotations.parse("MyAnnotation(Five=5)"))
Example #5
0
 def test_parse_a_declaration_with_a_list_of_objects_value(self):
     self.assertEquals(Object("MyAnnotation",[Field("Value",List([Object("MyValue"),Object("YourValue")]))]), annotations.parse("MyAnnotation(Value={@MyValue(),@YourValue()})"))