def test_parse_a_declaration_with_an_object_value(self): self.assertEquals(Object("MyAnnotation",[Field("Value",Object("MyValue"))]), annotations.parse("MyAnnotation(Value=@MyValue())"))
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\")"))
def test_parse_a_simple_declaration(self): self.assertEquals(Object("MyAnnotation"), annotations.parse("MyAnnotation()"))
def test_parse_a_declaration_with_a_value(self): self.assertEquals(Object("MyAnnotation",[Field("Five",Literal("5"))]), annotations.parse("MyAnnotation(Five=5)"))
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()})"))