@@ -0,0 +1,2322 @@
+/*%0A * See LICENSE file in distribution for copyright and licensing information.%0A */%0Apackage seph.lang.ast;%0A%0Aimport org.junit.Test;%0Aimport static org.junit.Assert.*;%0A%0Aimport seph.lang.SephObject;%0Aimport seph.lang.Text;%0A%0A/**%0A * @author %3Ca href=%22mailto:ola.bini@gmail.com%22%3EOla Bini%3C/a%3E%0A */%0Apublic class LiteralMessageTest %7B%0A    @Test%0A    public void ensure_class_exists() %7B%0A        assertEquals(%22seph.lang.ast.LiteralMessage%22, seph.lang.ast.LiteralMessage.class.getName());%0A    %7D%0A%0A    @Test%0A    public void is_a_seph_object() %7B%0A        assertTrue(%22A LiteralMessage should be a SephObject%22, new LiteralMessage(null, null) instanceof SephObject);%0A    %7D%0A%0A    @Test%0A    public void is_a_message() %7B%0A        assertTrue(%22A LiteralMessage should be a Message%22, new LiteralMessage(null, null) instanceof Message);%0A    %7D%0A%0A    @Test%0A    public void has_a_next_pointer() %7B%0A        Message one = new LiteralMessage(null, null);%0A        LiteralMessage two = new LiteralMessage(null, one);%0A        assertSame(one, two.next());%0A    %7D%0A%0A    @Test%0A    public void has_a_name_based_one_the_literal_class() %7B%0A        LiteralMessage msg = new LiteralMessage(new Text(%22foo%22), null);%0A        assertEquals(%22%3Cliteral:seph.lang.Text%3E%22, msg.name());%0A    %7D%0A%0A    @Test%0A    public void has_an_empty_list_of_arguments() %7B%0A        LiteralMessage msg = new LiteralMessage(null, null);%0A        assertArrayEquals(new Message%5B0%5D, msg.arguments());%0A    %7D%0A%0A    @Test%0A    public void with_next_returns_a_new_object_with_the_same_literal() %7B%0A        SephObject lit = new Text(%22bar%22);%0A        LiteralMessage msg = new LiteralMessage(lit, null);%0A        assertSame(lit, msg.withNext(null).literal());%0A    %7D%0A%0A    @Test%0A    public void with_next_returns_a_new_object_with_a_new_next() %7B%0A        Message expected = new LiteralMessage(null, null);%0A        LiteralMessage msg = new LiteralMessage(null, null);%0A        assertSame(expected, msg.withNext(expected).next());%0A    %7D%0A%0A    @Test%0A    public void literal_returns_the_literal_given() %7B%0A        SephObject lit = new Text(%22bar%22);%0A        LiteralMessage msg = new LiteralMessage(lit, null);%0A        assertSame(lit, msg.literal());%0A    %7D%0A%0A    @Test%0A    public void is_literal_returns_true() %7B%0A        LiteralMessage msg = new LiteralMessage(null, null);%0A        assertTrue(msg.isLiteral());%0A    %7D%0A%7D// LiteralMessageTest%0A

Add tests for literal messages