Download practicalunittesting examples Free Java Code
Description
Source code of the examples from "Practical Unit Testing with TestNG and Mockito".
Source Files
The download file practicalunittesting-examples-master.zip has the following entries.
README.asciidoc/*from w ww.j a v a2 s . c om*/
build.gradle
chp_02_financial_service/src/main/java/com/practicalunittesting/Calculator.java
chp_02_financial_service/src/main/java/com/practicalunittesting/ClientDAO.java
chp_02_financial_service/src/main/java/com/practicalunittesting/FinancialService.java
chp_03_client/src/main/java/com/practicalunittesting/Address.java
chp_03_client/src/main/java/com/practicalunittesting/Client.java
chp_03_client/src/test/java/com/practicalunittesting/ClientNoSetUpTest.java
chp_03_client/src/test/java/com/practicalunittesting/ClientTest.java
chp_03_money/src/main/java/com/practicalunittesting/Money.java
chp_03_money/src/test/java/com/practicalunittesting/MoneyDataProviderTest.java
chp_03_money/src/test/java/com/practicalunittesting/MoneyIAETest.java
chp_03_money/src/test/java/com/practicalunittesting/MoneyManyValuesTest.java
chp_03_money/src/test/java/com/practicalunittesting/MoneyTest.java
chp_03_money/src/test/java/com/practicalunittesting/data/MoneyDataProvider.java
chp_03_money/src/test/java/com/practicalunittesting/data/MoneyTestExternalDataProvider.java
chp_04_client/src/main/java/com/practicalunittesting/Client.java
chp_04_client/src/test/java/com/practicalunittesting/IDEQuicFixTest.java
chp_04_football_team/src/main/java/com/practicalunittesting/FootballTeam.java
chp_04_football_team/src/test/java/com/practicalunittesting/FootballTeamTest.java
chp_05_car/src/main/java/com/practicalunittesting/Car.java
chp_05_car/src/test/java/com/practicalunittesting/FailedVerificationArgumentsTest.java
chp_05_car/src/test/java/com/practicalunittesting/FailedVerificationTest.java
chp_05_car/src/test/java/com/practicalunittesting/FirstMockitoTest.java
chp_05_car/src/test/java/com/practicalunittesting/MockitoVerificationTest.java
chp_05_mock_or_not/src/main/java/com/practicalunittesting/Client.java
chp_05_mock_or_not/src/main/java/com/practicalunittesting/Client2.java
chp_05_mock_or_not/src/main/java/com/practicalunittesting/Phone.java
chp_05_mock_or_not/src/main/java/com/practicalunittesting/Phone2.java
chp_05_mock_or_not/src/test/java/com/practicalunittesting/NotMockingPhone2Test.java
chp_05_mock_or_not/src/test/java/com/practicalunittesting/NotMockingTest.java
chp_05_mock_or_not/src/test/java/com/practicalunittesting/easymock/MockingTest.java
chp_05_mock_or_not/src/test/java/com/practicalunittesting/mockito/MockingPhone2Test.java
chp_05_mock_or_not/src/test/java/com/practicalunittesting/mockito/MockingTest.java
chp_05_race_results/src/main/java/com/practicalunittesting/Client.java
chp_05_race_results/src/main/java/com/practicalunittesting/Message.java
chp_05_race_results/src/main/java/com/practicalunittesting/RaceResultsService.java
chp_05_race_results/src/test/java/com/practicalunittesting/RaceResultsServiceFirstAndSecondRefactoredTest.java
chp_05_race_results/src/test/java/com/practicalunittesting/RaceResultsServiceFirstAndSecondTest.java
chp_05_race_results/src/test/java/com/practicalunittesting/RaceResultsServiceFirstRefactoredTest.java
chp_05_race_results/src/test/java/com/practicalunittesting/RaceResultsServiceFirstTest.java
chp_05_race_results/src/test/java/com/practicalunittesting/RaceResultsServiceTest.java
chp_05_test_doubles/src/main/java/com/practicalunittesting/Client.java
chp_05_test_doubles/src/main/java/com/practicalunittesting/MailServer.java
chp_05_test_doubles/src/main/java/com/practicalunittesting/Messenger.java
chp_05_test_doubles/src/main/java/com/practicalunittesting/Template.java
chp_05_test_doubles/src/main/java/com/practicalunittesting/TemplateEngine.java
chp_05_test_doubles/src/test/java/com/practicalunittesting/MessengerTest.java
chp_06_collections/src/main/java/com/practicalunittesting/Book.java
chp_06_collections/src/test/java/com/practicalunittesting/SetEqualityTest.java
chp_06_collections/src/test/java/com/practicalunittesting/SetTest.java
chp_06_collections/src/test/java/com/practicalunittesting/TDDNarrowingShortTest.java
chp_06_collections/src/test/java/com/practicalunittesting/TDDNarrowingTest.java
chp_06_collections/src/test/java/com/practicalunittesting/fest/FestTest.java
chp_06_collections/src/test/java/com/practicalunittesting/hamcrest/HamcrestTest.java
chp_06_collections/src/test/java/com/practicalunittesting/unitils/SetEqualityUnitilsTest.java
chp_06_excel_read/src/main/java/com/practicalunittesting/DiscountCalculator.java
chp_06_excel_read/src/test/java/com/practicalunittesting/ReadExcelTest.java
chp_06_excel_read/src/test/resources/financial.xls
chp_06_expected_exceptions/src/main/java/com/practicalunittesting/Phone.java
chp_06_expected_exceptions/src/main/java/com/practicalunittesting/adv/InvalidRequestException.java
chp_06_expected_exceptions/src/main/java/com/practicalunittesting/adv/Request.java
chp_06_expected_exceptions/src/main/java/com/practicalunittesting/adv/RequestHandler.java
chp_06_expected_exceptions/src/main/java/com/practicalunittesting/adv/RequestProcessor.java
chp_06_expected_exceptions/src/test/java/com/practicalunittesting/ExpectedExceptionMessageTest.java
chp_06_expected_exceptions/src/test/java/com/practicalunittesting/adv/AdvExpExceptionsTest.java
chp_06_expected_exceptions/src/test/java/com/practicalunittesting/bdd/BDD.java
chp_06_expected_exceptions/src/test/java/com/practicalunittesting/bdd/MyException.java
chp_06_expected_exceptions/src/test/java/com/practicalunittesting/bdd/SUT.java
chp_06_expected_exceptions/src/test/java/com/practicalunittesting/bdd/TryCatchBDD.java
chp_06_id_generator/src/main/java/com/practicalunittesting/AtomicIdGenerator.java
chp_06_id_generator/src/main/java/com/practicalunittesting/IdGenerator.java
chp_06_id_generator/src/main/java/com/practicalunittesting/JVMUniqueIdGenerator.java
chp_06_id_generator/src/main/java/com/practicalunittesting/SystemIdGenerator.java
chp_06_id_generator/src/test/java/com/practicalunittesting/AtomicIdGeneratorTest.java
chp_06_id_generator/src/test/java/com/practicalunittesting/JVMUniqueIdGeneratorTest.java
chp_06_id_generator/src/test/java/com/practicalunittesting/SystemIdGeneratorTest.java
chp_06_id_generator/src/test/java/com/practicalunittesting/parallel/AtomicIdGeneratorParallelTest.java
chp_06_id_generator/src/test/java/com/practicalunittesting/parallel/JVMUniqueIdGeneratorParallelTest.java
chp_06_id_generator/src/test/java/com/practicalunittesting/parallel/SystemIdGeneratorParallelTest.java
chp_06_matchers/src/main/java/com/practicalunittesting/Book.java
chp_06_matchers/src/test/java/com/practicalunittesting/BookFestTest.java
chp_06_matchers/src/test/java/com/practicalunittesting/BookHamcrestTest.java
chp_06_matchers/src/test/java/com/practicalunittesting/BookTest.java
chp_06_matchers/src/test/java/com/practicalunittesting/fest/BookAssert.java
chp_06_mockito_matchers/src/main/java/com/practicalunittesting/User.java
chp_06_mockito_matchers/src/main/java/com/practicalunittesting/UserDAO.java
chp_06_mockito_matchers/src/test/java/com/practicalunittesting/MockitoHamcrestMatchersTest.java
chp_06_mockito_matchers/src/test/java/com/practicalunittesting/MockitoMatchersTest.java
chp_06_stubbing_void/src/main/java/com/practicalunittesting/MyClass.java
chp_06_stubbing_void/src/test/java/com/practicalunittesting/StubbingVoidTest.java
chp_06_time/src/main/java/com/practicalunittesting/Hello.java
chp_06_time/src/main/java/com/practicalunittesting/HelloRedesigned.java
chp_06_time/src/main/java/com/practicalunittesting/TimeProvider.java
chp_06_time/src/test/java/com/practicalunittesting/HelloJodaTimeTest.java
chp_06_time/src/test/java/com/practicalunittesting/HelloRedesignedTest.java
chp_06_time/src/test/java/com/practicalunittesting/HelloTest.java
chp_07_capturing_arguments/src/main/java/com/practicalunittesting/Calendar.java
chp_07_capturing_arguments/src/main/java/com/practicalunittesting/Event.java
chp_07_capturing_arguments/src/main/java/com/practicalunittesting/Meeting.java
chp_07_capturing_arguments/src/main/java/com/practicalunittesting/PIM.java
chp_07_capturing_arguments/src/test/java/com/practicalunittesting/PIMTest.java
chp_07_capturing_arguments/src/test/java/com/practicalunittesting/captor/PIMTest.java
chp_07_how_many_assertions/src/main/java/com/practicalunittesting/Address.java
chp_07_how_many_assertions/src/test/java/com/practicalunittesting/AddressParsingManyAsserts.java
chp_07_how_many_assertions/src/test/java/com/practicalunittesting/AddressParsingOneAssert.java
chp_07_new_operator/src/main/java/com/practicalunittesting/MyCollaborator.java
chp_07_new_operator/src/main/java/com/practicalunittesting/injection/constructor/MySut.java
chp_07_new_operator/src/main/java/com/practicalunittesting/injection/method/MySut.java
chp_07_new_operator/src/main/java/com/practicalunittesting/original/MySut.java
chp_07_new_operator/src/main/java/com/practicalunittesting/partial/MyPartialSut.java
chp_07_new_operator/src/main/java/com/practicalunittesting/powermock/MySut.java
chp_07_new_operator/src/main/java/com/practicalunittesting/refactored/MyRefactoredSut.java
chp_07_new_operator/src/test/java/com/practicalunittesting/injection/constructor/MySutTest.java
chp_07_new_operator/src/test/java/com/practicalunittesting/injection/method/MySutTest.java
chp_07_new_operator/src/test/java/com/practicalunittesting/original/MySutTest.java
chp_07_new_operator/src/test/java/com/practicalunittesting/partial/MySutPartialTest.java
chp_07_new_operator/src/test/java/com/practicalunittesting/powermock/MySutTest.java
chp_07_new_operator/src/test/java/com/practicalunittesting/refactored/MySutRefactoredTest.java
settings.gradle
Download
Click the following link to download practicalunittesting-examples-master.zip.
practicalunittesting-examples-master.zip