KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > jmock > examples > calculator > TokenTest


1 /* Copyright (c) 2000-2004 jMock.org
2  */

3 package test.jmock.examples.calculator;
4
5 import junit.framework.TestCase;
6 import org.jmock.examples.calculator.Token;
7
8
9 public class TokenTest extends TestCase
10 {
11     public void testStoresTokenTypeAndStringValue() {
12         int tokenType = 1000;
13         String JavaDoc tokenValue = "<TOKEN VALUE>";
14
15         Token token = new Token(tokenType, tokenValue);
16
17         assertEquals("should be token type", tokenType, token.getType());
18         assertEquals("should be token value", tokenValue, token.getValue());
19     }
20 }
21
Popular Tags