Review comments++

This commit is contained in:
Amit Dixit 2016-11-15 12:59:05 +05:30
parent ea7752c5e1
commit 4ff8fa3721
4 changed files with 494 additions and 501 deletions
module/src
main/java/com/iluwatar/module
test/java/com/iluwatar/module

@ -33,8 +33,8 @@ import java.io.FileNotFoundException;
*/
public final class App {
public static FileLoggerModule fileLoggerModule = null;
public static ConsoleLoggerModule consoleLoggerModule = null;
public static FileLoggerModule fileLoggerModule;
public static ConsoleLoggerModule consoleLoggerModule;
/**
* Following method performs the initialization
@ -44,6 +44,7 @@ public final class App {
*/
public static void prepare() throws FileNotFoundException {
/* Create new singleton objects and prepare their modules */
fileLoggerModule = FileLoggerModule.getSingleton();
consoleLoggerModule = ConsoleLoggerModule.getSingleton();

@ -23,11 +23,7 @@ import java.io.PrintStream;
import org.apache.log4j.Logger;
/**
* The Module pattern can be considered a Creational pattern and a Structural pattern. It manages
* the creation and organization of other elements, and groups them as the structural pattern does.
* An object that applies this pattern can provide the equivalent of a namespace, providing the
* initialization and finalization process of a static class or a class with static members with
* cleaner, more concise syntax and semantics.
* The ConsoleLoggerModule is responsible for showing logs on System Console
* <p>
* The below example demonstrates a Console logger module, which can print simple and error messages
* in two designated formats

@ -25,11 +25,7 @@ import java.io.PrintStream;
import org.apache.log4j.Logger;
/**
* The Module pattern can be considered a Creational pattern and a Structural pattern. It manages
* the creation and organization of other elements, and groups them as the structural pattern does.
* An object that applies this pattern can provide the equivalent of a namespace, providing the
* initialization and finalization process of a static class or a class with static members with
* cleaner, more concise syntax and semantics.
* The FileLoggerModule is responsible for showing logs on File System
* <p>
* The below example demonstrates a File logger module, which can print simple and error messages in
* two designated files

@ -55,7 +55,7 @@ public final class FileLoggerModuleTest {
* @throws IOException if program is not able to find log files (output.txt and error.txt)
*/
@Test
public void positiveTestFileMessage() throws IOException {
public void testFileMessage() throws IOException {
/* Get singletong instance of File Logger Module */
final FileLoggerModule fileLoggerModule = FileLoggerModule.getSingleton();
@ -79,7 +79,7 @@ public final class FileLoggerModuleTest {
* @throws IOException if program is not able to find log files (output.txt and error.txt)
*/
@Test
public void negativeTestFileMessage() throws IOException {
public void testNoFileMessage() throws IOException {
/* Get singletong instance of File Logger Module */
final FileLoggerModule fileLoggerModule = FileLoggerModule.getSingleton();
@ -101,7 +101,7 @@ public final class FileLoggerModuleTest {
* error.txt)
*/
@Test
public void positiveTestFileErrorMessage() throws FileNotFoundException {
public void testFileErrorMessage() throws FileNotFoundException {
/* Get singletong instance of File Logger Module */
final FileLoggerModule fileLoggerModule = FileLoggerModule.getSingleton();
@ -126,7 +126,7 @@ public final class FileLoggerModuleTest {
* error.txt)
*/
@Test
public void negativeTestFileErrorMessage() throws FileNotFoundException {
public void testNoFileErrorMessage() throws FileNotFoundException {
/* Get singletong instance of File Logger Module */
final FileLoggerModule fileLoggerModule = FileLoggerModule.getSingleton();