Ejemplo 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())"))
Ejemplo 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\")"))
Ejemplo n.º 3
0
 def test_parse_a_simple_declaration(self):
     self.assertEquals(Object("MyAnnotation"), annotations.parse("MyAnnotation()"))
Ejemplo 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)"))
Ejemplo 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()})"))