samples/individualsamples/test/org/apidesign/samples/CodeThatCanBeCalledOnlyByTestTest.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Fri, 03 Apr 2020 16:32:36 +0200
changeset 416 9ed8788a1a4e
permissions -rw-r--r--
Using HTTPS to download the libraries
     1 package org.apidesign.samples;
     2 
     3 import org.junit.Test;
     4 import static org.junit.Assert.*;
     5 
     6 public class CodeThatCanBeCalledOnlyByTestTest {
     7 
     8     public CodeThatCanBeCalledOnlyByTestTest() {
     9     }
    10 
    11     @Test
    12     public void setNumber() {
    13         CodeThatCanBeCalledOnlyByTest.setNumber(111);
    14         assertEquals(
    15             "Changing number is OK from tests", 
    16             111, 
    17             CodeThatCanBeCalledOnlyByTest.getNumber()
    18         );
    19     }
    20 
    21 }