Esempio n. 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())"))
Esempio n. 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\")"))
Esempio n. 3
0
 def test_parse_a_simple_declaration(self):
     self.assertEquals(Object("MyAnnotation"), annotations.parse("MyAnnotation()"))
Esempio n. 4
0
 def test_parse_a_declaration_with_a_value(self):
     self.assertEquals(Object("MyAnnotation",[Field("Five",Literal("5"))]), annotations.parse("MyAnnotation(Five=5)"))
Esempio n. 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()})"))