Added "Verifying Your Code" Chapter

Incorporated/Removed associated appendices
This commit is contained in:
Bruce Eckel 2016-08-09 13:34:35 -06:00
parent de9342c930
commit 003be8a597
22 changed files with 20 additions and 25 deletions

View File

@ -1,3 +0,0 @@
dependencies {
compile 'junit:junit:4.12'
}

View File

@ -1,4 +1,4 @@
// assertions/Assert1.java
// verifying/Assert1.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// assertions/Assert2.java
// verifying/Assert2.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// logging/ConfigureLogging.java
// verifying/ConfigureLogging.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// logging/CustomHandler.java
// verifying/CustomHandler.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// logging/InfoLogging.java
// verifying/InfoLogging.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// logging/InfoLogging2.java
// verifying/InfoLogging2.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,9 +1,8 @@
// unittesting/JUnitDemo.java
// verifying/JUnitDemo.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
// Simple use of JUnit to test ArrayList
// (Install libraries from junit.org)
import java.util.*;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

View File

@ -1,4 +1,4 @@
// assertions/LoaderAssertions.java
// verifying/LoaderAssertions.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// logging/LogToFile.java
// verifying/LogToFile.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// logging/LogToFile2.java
// verifying/LogToFile2.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// logging/LoggingLevelManipulation.java
// verifying/LoggingLevelManipulation.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// logging/LoggingLevels.java
// verifying/LoggingLevels.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// logging/MultipleHandlers.java
// verifying/MultipleHandlers.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// logging/MultipleHandlers2.java
// verifying/MultipleHandlers2.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// logging/PrintableLogRecord.java
// verifying/PrintableLogRecord.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,10 +1,9 @@
// assertions/Queue.java
// verifying/Queue.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
// Demonstration of Design by Contract (DbC)
// combined with white-box unit testing
// (Install libraries from www.junit.org)
import java.util.*;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

View File

@ -1,4 +1,4 @@
// debugging/SimpleDebugging.java
// verifying/SimpleDebugging.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// logging/SimpleFilter.java
// verifying/SimpleFilter.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// logging/SimpleFormatterExample.java
// verifying/SimpleFormatterExample.java
// (c)2016 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose.
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.

View File

@ -1,4 +1,4 @@
// logging/log.prop
// verifying/log.prop
#### Configuration File ####
# Global Params
# Handlers installed for the root logger