Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: d156fc38ef421c2a188461234d02a7920bd44b8c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*******************************************************************************
 * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/

package org.eclipse.etrice.runtime.java.messaging;

import org.eclipse.etrice.runtime.java.messaging.Address;
import org.eclipse.etrice.runtime.java.messaging.Message;

import junit.framework.TestCase;

public class MessageTest extends TestCase {

	public void testSetGetNext() {
		Message msg1 = new Message(new Address(0, 0, 0));
		Message msg2 = new Message(new Address(0, 0, 0));
		msg1.setNext(msg2);
		msg2.setNext(msg1);
		assertEquals(msg1.getNext(), msg2);
		assertEquals(msg2.getNext(), msg1);
	}
	
	public void testToString() {
		Message msg = new Message(new Address(1,2,3));
		assertEquals("Message(Address(n=1,t=2,o=3))", msg.toString());
	}


}

Back to the top