From a5f3ab319aa1e4ebb19f8726a5acf9736366b003 Mon Sep 17 00:00:00 2001 From: "Tristian.O'Brien" Date: Sat, 17 Nov 2012 13:28:15 +0000 Subject: [PATCH 1/9] code review file --- .../review/4096-tristian o'brien.review | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 BankWithAuditors/review/4096-tristian o'brien.review diff --git a/BankWithAuditors/review/4096-tristian o'brien.review b/BankWithAuditors/review/4096-tristian o'brien.review new file mode 100644 index 0000000..20c2372 --- /dev/null +++ b/BankWithAuditors/review/4096-tristian o'brien.review @@ -0,0 +1,20 @@ + + + + + 2012-11-17 :: 13:27:05:892 GMT + 2012-11-17 :: 13:27:41:070 GMT + + tristian o'brien + tristian o'brien + src/code/ChainFactory.java + item.type.label.codingStandards + item.label.unset + checkstyle issues + checkstyle found 149 code review issues for all files + + + item.label.unset + item.status.label.open + + \ No newline at end of file From 77c68fd0c702f8db5815a6a6af90a0c312e128d7 Mon Sep 17 00:00:00 2001 From: "Tristian.O'Brien" Date: Sun, 25 Nov 2012 17:02:47 +0000 Subject: [PATCH 2/9] implement my THandler --- BankWithAuditors/.idea/.name | 1 + BankWithAuditors/.idea/compiler.xml | 21 + BankWithAuditors/.idea/encodings.xml | 5 + BankWithAuditors/.idea/misc.xml | 13 + BankWithAuditors/.idea/modules.xml | 9 + .../.idea/scopes/scope_settings.xml | 5 + BankWithAuditors/.idea/vcs.xml | 8 + BankWithAuditors/.idea/workspace.xml | 771 ++++++++++++++++++ BankWithAuditors/Exper.iml | 22 + BankWithAuditors/src/code/THandler.java | 32 + BankWithAuditors/src/tests/RequestTest.java | 48 ++ 11 files changed, 935 insertions(+) create mode 100644 BankWithAuditors/.idea/.name create mode 100644 BankWithAuditors/.idea/compiler.xml create mode 100644 BankWithAuditors/.idea/encodings.xml create mode 100644 BankWithAuditors/.idea/misc.xml create mode 100644 BankWithAuditors/.idea/modules.xml create mode 100644 BankWithAuditors/.idea/scopes/scope_settings.xml create mode 100644 BankWithAuditors/.idea/vcs.xml create mode 100644 BankWithAuditors/.idea/workspace.xml create mode 100644 BankWithAuditors/Exper.iml create mode 100644 BankWithAuditors/src/code/THandler.java diff --git a/BankWithAuditors/.idea/.name b/BankWithAuditors/.idea/.name new file mode 100644 index 0000000..e7aa4d0 --- /dev/null +++ b/BankWithAuditors/.idea/.name @@ -0,0 +1 @@ +Exper \ No newline at end of file diff --git a/BankWithAuditors/.idea/compiler.xml b/BankWithAuditors/.idea/compiler.xml new file mode 100644 index 0000000..01e8c07 --- /dev/null +++ b/BankWithAuditors/.idea/compiler.xml @@ -0,0 +1,21 @@ + + + + + + diff --git a/BankWithAuditors/.idea/encodings.xml b/BankWithAuditors/.idea/encodings.xml new file mode 100644 index 0000000..7c62b52 --- /dev/null +++ b/BankWithAuditors/.idea/encodings.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/BankWithAuditors/.idea/misc.xml b/BankWithAuditors/.idea/misc.xml new file mode 100644 index 0000000..9fc8feb --- /dev/null +++ b/BankWithAuditors/.idea/misc.xml @@ -0,0 +1,13 @@ + + + + + + + http://www.w3.org/1999/xhtml + + + + + + diff --git a/BankWithAuditors/.idea/modules.xml b/BankWithAuditors/.idea/modules.xml new file mode 100644 index 0000000..1d371c5 --- /dev/null +++ b/BankWithAuditors/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/BankWithAuditors/.idea/scopes/scope_settings.xml b/BankWithAuditors/.idea/scopes/scope_settings.xml new file mode 100644 index 0000000..0d5175c --- /dev/null +++ b/BankWithAuditors/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/BankWithAuditors/.idea/vcs.xml b/BankWithAuditors/.idea/vcs.xml new file mode 100644 index 0000000..7332f6d --- /dev/null +++ b/BankWithAuditors/.idea/vcs.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/BankWithAuditors/.idea/workspace.xml b/BankWithAuditors/.idea/workspace.xml new file mode 100644 index 0000000..7d3573e --- /dev/null +++ b/BankWithAuditors/.idea/workspace.xml @@ -0,0 +1,771 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + localhost + 5050 + + + + + + + 1353860528612 + 1353860528612 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Exper + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BankWithAuditors/Exper.iml b/BankWithAuditors/Exper.iml new file mode 100644 index 0000000..b568082 --- /dev/null +++ b/BankWithAuditors/Exper.iml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/BankWithAuditors/src/code/THandler.java b/BankWithAuditors/src/code/THandler.java new file mode 100644 index 0000000..d87017a --- /dev/null +++ b/BankWithAuditors/src/code/THandler.java @@ -0,0 +1,32 @@ +/** + * + */ +package code; + +/** + * @author tristian + * + */ +public class THandler extends Handler { + + /* (non-Javadoc) + * @see code.Handler#handleRequest(code.Request) + */ + @Override + public Boolean handleRequest(Request request) { + String requestType = "Tristian"; + + if (requestType.equals(request.getRequestType())){ + String instruction = request.getInstruction(); + String instructionField = request.getInstructionField(); + System.out.println(requestType + " " + instruction + " " + instructionField); + return true; + } else { + if(handler != null){ + return this.handler.handleRequest(request); + } + } + return false; + } + +} diff --git a/BankWithAuditors/src/tests/RequestTest.java b/BankWithAuditors/src/tests/RequestTest.java index de7dd73..dcf06c7 100644 --- a/BankWithAuditors/src/tests/RequestTest.java +++ b/BankWithAuditors/src/tests/RequestTest.java @@ -55,5 +55,53 @@ public void test3() { assertEquals("Not equal",expectedOutput,actualOutput); } + + @Test + public void test4() { + + String instruction = "10"; + String instructionField = "5"; + String expectedOutput = "Tristian"; + String actualOutput; + String input = "Tristian"; + Request classUnderTest = new Request(input, instruction, instructionField); + + actualOutput = classUnderTest.getRequestType(); + + + assertEquals("Not equal",expectedOutput,actualOutput); + } + + @Test + public void test5() { + + String instruction = "10"; + String instructionField = "5"; + String expectedOutput = "10"; + String actualOutput; + String input = "Tristian"; + Request classUnderTest = new Request(input, instruction, instructionField); + + + actualOutput = classUnderTest.getInstruction(); + + assertEquals("Not equal",expectedOutput,actualOutput); + } + + @Test + public void test6() { + + String instruction = "10"; + String instructionField = "5"; + String expectedOutput = "5"; + String actualOutput; + String input = "Tristian"; + Request classUnderTest = new Request(input, instruction, instructionField); + + + actualOutput = classUnderTest.getInstructionField(); + + assertEquals("Not equal",expectedOutput,actualOutput); + } } From 72802a2535f9dfeea3e90affd7868e20edb5b6e9 Mon Sep 17 00:00:00 2001 From: "Tristian.O'Brien" Date: Sun, 25 Nov 2012 17:07:48 +0000 Subject: [PATCH 3/9] implement my THandler --- BankWithAuditors/.idea/workspace.xml | 87 +++++++++++-------- .../src/tests/ChainFactoryTest.java | 27 ++++-- 2 files changed, 71 insertions(+), 43 deletions(-) diff --git a/BankWithAuditors/.idea/workspace.xml b/BankWithAuditors/.idea/workspace.xml index 7d3573e..147b7e9 100644 --- a/BankWithAuditors/.idea/workspace.xml +++ b/BankWithAuditors/.idea/workspace.xml @@ -2,17 +2,8 @@ - - - - - - - - - - - + + @@ -23,6 +14,11 @@ + + + tests.* + + @@ -70,19 +66,19 @@ - + - + - - + + - + @@ -115,10 +111,10 @@ - + - + @@ -179,6 +175,7 @@ @@ -440,7 +437,9 @@ + + @@ -540,6 +539,11 @@ 1353860528612 1353860528612 + + 1353862967942 + 1353862967942 + +