author | Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
Thu, 30 Oct 2014 20:46:27 +0100 | |
changeset 408 | 9a439a79c6d0 |
permissions | -rw-r--r-- |
jtulach@143 | 1 |
package org.apidesign.samples; |
jtulach@143 | 2 |
|
jtulach@143 | 3 |
import org.junit.Test; |
jtulach@143 | 4 |
import static org.junit.Assert.*; |
jtulach@143 | 5 |
|
jtulach@143 | 6 |
public class CodeThatCanBeCalledOnlyByTestTest { |
jtulach@143 | 7 |
|
jtulach@143 | 8 |
public CodeThatCanBeCalledOnlyByTestTest() { |
jtulach@143 | 9 |
} |
jtulach@143 | 10 |
|
jtulach@143 | 11 |
@Test |
jtulach@143 | 12 |
public void setNumber() { |
jtulach@143 | 13 |
CodeThatCanBeCalledOnlyByTest.setNumber(111); |
jtulach@143 | 14 |
assertEquals( |
jtulach@143 | 15 |
"Changing number is OK from tests", |
jtulach@143 | 16 |
111, |
jtulach@143 | 17 |
CodeThatCanBeCalledOnlyByTest.getNumber() |
jtulach@143 | 18 |
); |
jtulach@143 | 19 |
} |
jtulach@143 | 20 |
|
jtulach@143 | 21 |
} |