samples/individualsamples/src/org/apidesign/samples/CodeThatCanBeCalledOnlyByTest.java
Was this a reverted condition? It seems that a code that can only be called be a test needs to be allowed when assertions are on.
When assertions are off, it should throw IllegalStateException. Right?
1 package org.apidesign.samples;
3 public class CodeThatCanBeCalledOnlyByTest {
4 private static int number;
6 public static int getNumber() {
10 public static void setNumber(int n) {
11 // BEGIN: call.only.by.test
12 boolean assertionsOn = false;
13 assert assertionsOn = true;
15 throw new IllegalStateException("This is a testing method only!");
17 // END: call.only.by.test