samples/individualsamples/test/org/apidesign/samples/CodeThatCanBeCalledOnlyByTestTest.java
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/samples/individualsamples/test/org/apidesign/samples/CodeThatCanBeCalledOnlyByTestTest.java Sat Jun 14 09:57:12 2008 +0200
1.3 @@ -0,0 +1,21 @@
1.4 +package org.apidesign.samples;
1.5 +
1.6 +import org.junit.Test;
1.7 +import static org.junit.Assert.*;
1.8 +
1.9 +public class CodeThatCanBeCalledOnlyByTestTest {
1.10 +
1.11 + public CodeThatCanBeCalledOnlyByTestTest() {
1.12 + }
1.13 +
1.14 + @Test
1.15 + public void setNumber() {
1.16 + CodeThatCanBeCalledOnlyByTest.setNumber(111);
1.17 + assertEquals(
1.18 + "Changing number is OK from tests",
1.19 + 111,
1.20 + CodeThatCanBeCalledOnlyByTest.getNumber()
1.21 + );
1.22 + }
1.23 +
1.24 +}
1.25 \ No newline at end of file