From 5ee73ceba186899adfd27f62c05535c131ffbba2 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 14:39:11 +0300 Subject: [PATCH 01/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 3 +++ .besouro/20160929143835621/besouroEpisodes.txt | 0 .besouro/20160929143835621/disagreements.txt | 0 .besouro/20160929143835621/randomHeuristicEpisodes.txt | 0 .besouro/20160929143835621/userComments.txt | 0 .besouro/20160929143835621/zorroEpisodes.txt | 0 src/RomanNumerals.java | 4 ++++ 7 files changed, 7 insertions(+) create mode 100644 .besouro/20160929143835621/actions.txt create mode 100644 .besouro/20160929143835621/besouroEpisodes.txt create mode 100644 .besouro/20160929143835621/disagreements.txt create mode 100644 .besouro/20160929143835621/randomHeuristicEpisodes.txt create mode 100644 .besouro/20160929143835621/userComments.txt create mode 100644 .besouro/20160929143835621/zorroEpisodes.txt diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt new file mode 100644 index 0000000..5485e86 --- /dev/null +++ b/.besouro/20160929143835621/actions.txt @@ -0,0 +1,3 @@ +FileOpenedAction 1475149115895 TestRomanNumerals.java 159 2 2 1 +RefactoringAction 1475149129818 TestRomanNumerals.java RENAME test()/2=>void test2() METHOD +EditAction 1475149150848 RomanNumerals.java 206 2 1 0 diff --git a/.besouro/20160929143835621/besouroEpisodes.txt b/.besouro/20160929143835621/besouroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160929143835621/disagreements.txt b/.besouro/20160929143835621/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160929143835621/randomHeuristicEpisodes.txt b/.besouro/20160929143835621/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160929143835621/userComments.txt b/.besouro/20160929143835621/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20160929143835621/zorroEpisodes.txt b/.besouro/20160929143835621/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 20904f0..1904c10 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,5 +1,9 @@ public class RomanNumerals { + public RomanNumerals(String string) { + // TODO Auto-generated constructor stub + } + public int convertToInteger(String romanNum) { // To be Implemented return 0; From d22c2b078bc5e3eb0e4a7510efc578fd7384fd9c Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 14:39:12 +0300 Subject: [PATCH 02/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 1 + tests/TestRomanNumerals.java | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 5485e86..4a16c83 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -1,3 +1,4 @@ FileOpenedAction 1475149115895 TestRomanNumerals.java 159 2 2 1 RefactoringAction 1475149129818 TestRomanNumerals.java RENAME test()/2=>void test2() METHOD EditAction 1475149150848 RomanNumerals.java 206 2 1 0 +EditAction 1475149152126 TestRomanNumerals.java 232 2 2 1 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 5d1de75..2ffee76 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -6,7 +6,13 @@ public class TestRomanNumerals { @Test public void test() { - fail("Not yet implemented"); + RomanNumerals rm = new RomanNumerals("I"); + assertNotNull(rm); + } + + @Test + public void test2() { + } } From 8a4e09f2348078c3a2d073cba4254be973c9df66 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 14:48:24 +0300 Subject: [PATCH 03/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 8 ++++++++ .besouro/20160929143835621/besouroEpisodes.txt | 4 ++++ .besouro/20160929143835621/randomHeuristicEpisodes.txt | 1 + .besouro/20160929143835621/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 2 ++ 5 files changed, 16 insertions(+) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 4a16c83..0ff4ccc 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -2,3 +2,11 @@ FileOpenedAction 1475149115895 TestRomanNumerals.java 159 2 2 1 RefactoringAction 1475149129818 TestRomanNumerals.java RENAME test()/2=>void test2() METHOD EditAction 1475149150848 RomanNumerals.java 206 2 1 0 EditAction 1475149152126 TestRomanNumerals.java 232 2 2 1 +UnitTestCaseAction 1475149153772 TestRomanNumerals.java OK +UnitTestSessionAction 1475149153773 TestRomanNumerals.java OK +RefactoringAction 1475149367594 TestRomanNumerals.java RENAME test2()=>void test()/2 METHOD +RefactoringAction 1475149372113 TestRomanNumerals.java RENAME test()/2=>void testReturn() METHOD +RefactoringAction 1475149581805 RomanNumerals.java ADD int getNumber() METHOD +RefactoringAction 1475149616055 RomanNumerals.java RENAME changeNumber()=>int getNumber() METHOD +RefactoringAction 1475149617082 RomanNumerals.java REMOVE getNumber() METHOD +EditAction 1475149703515 RomanNumerals.java 241 2 2 0 diff --git a/.besouro/20160929143835621/besouroEpisodes.txt b/.besouro/20160929143835621/besouroEpisodes.txt index e69de29..cdb2a3b 100644 --- a/.besouro/20160929143835621/besouroEpisodes.txt +++ b/.besouro/20160929143835621/besouroEpisodes.txt @@ -0,0 +1,4 @@ +1475149153773 refactoring 2B 37 true +1475149153774 refactoring 3 37 true +1475149153775 refactoring 1B 37 true +1475149153776 regression 1 37 true diff --git a/.besouro/20160929143835621/randomHeuristicEpisodes.txt b/.besouro/20160929143835621/randomHeuristicEpisodes.txt index e69de29..febd31c 100644 --- a/.besouro/20160929143835621/randomHeuristicEpisodes.txt +++ b/.besouro/20160929143835621/randomHeuristicEpisodes.txt @@ -0,0 +1 @@ +1475149153773 refactoring 2B 37 true diff --git a/.besouro/20160929143835621/zorroEpisodes.txt b/.besouro/20160929143835621/zorroEpisodes.txt index e69de29..b9d1792 100644 --- a/.besouro/20160929143835621/zorroEpisodes.txt +++ b/.besouro/20160929143835621/zorroEpisodes.txt @@ -0,0 +1 @@ +1475149153773 refactoring 2B 37 false diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 1904c10..2658319 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -6,6 +6,8 @@ public RomanNumerals(String string) { public int convertToInteger(String romanNum) { // To be Implemented + if(romanNum == "I") return 1; + return 0; } From 45f575f08925243b997a3b9d4d04308c22ed2b09 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 14:48:25 +0300 Subject: [PATCH 04/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 1 + tests/TestRomanNumerals.java | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 0ff4ccc..d3b0255 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -10,3 +10,4 @@ RefactoringAction 1475149581805 RomanNumerals.java ADD int getNumber() METHOD RefactoringAction 1475149616055 RomanNumerals.java RENAME changeNumber()=>int getNumber() METHOD RefactoringAction 1475149617082 RomanNumerals.java REMOVE getNumber() METHOD EditAction 1475149703515 RomanNumerals.java 241 2 2 0 +EditAction 1475149705008 TestRomanNumerals.java 362 2 5 2 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 2ffee76..5e6fd56 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -11,8 +11,10 @@ public void test() { } @Test - public void test2() { - + public void testReturn() { + RomanNumerals rm = new RomanNumerals("I"); + int number = rm.convertToInteger("I"); + assertEquals("I was not 1", 1, number); } } From 53ec1cf0b0e7765c65f89f180568d0ed2998c927 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 14:53:12 +0300 Subject: [PATCH 05/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 6 ++++++ .besouro/20160929143835621/besouroEpisodes.txt | 1 + .besouro/20160929143835621/randomHeuristicEpisodes.txt | 1 + .besouro/20160929143835621/zorroEpisodes.txt | 1 + tests/TestRomanNumerals.java | 2 +- 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index d3b0255..a914c79 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -11,3 +11,9 @@ RefactoringAction 1475149616055 RomanNumerals.java RENAME changeNumber()=>int ge RefactoringAction 1475149617082 RomanNumerals.java REMOVE getNumber() METHOD EditAction 1475149703515 RomanNumerals.java 241 2 2 0 EditAction 1475149705008 TestRomanNumerals.java 362 2 5 2 +UnitTestCaseAction 1475149706544 TestRomanNumerals.java OK +UnitTestSessionAction 1475149706545 TestRomanNumerals.java OK +RefactoringAction 1475149719805 TestRomanNumerals.java RENAME testReturn()=>void testReturnWithOne() METHOD +RefactoringAction 1475149728324 TestRomanNumerals.java RENAME testReturnWithOne()=>void testReturnWith() METHOD +RefactoringAction 1475149729840 TestRomanNumerals.java RENAME testReturnWith()=>void testReturnWith_I() METHOD +EditAction 1475149992309 TestRomanNumerals.java 368 2 5 2 diff --git a/.besouro/20160929143835621/besouroEpisodes.txt b/.besouro/20160929143835621/besouroEpisodes.txt index cdb2a3b..396fca9 100644 --- a/.besouro/20160929143835621/besouroEpisodes.txt +++ b/.besouro/20160929143835621/besouroEpisodes.txt @@ -2,3 +2,4 @@ 1475149153774 refactoring 3 37 true 1475149153775 refactoring 1B 37 true 1475149153776 regression 1 37 true +1475149706545 test-last 1 338 false diff --git a/.besouro/20160929143835621/randomHeuristicEpisodes.txt b/.besouro/20160929143835621/randomHeuristicEpisodes.txt index febd31c..ee69507 100644 --- a/.besouro/20160929143835621/randomHeuristicEpisodes.txt +++ b/.besouro/20160929143835621/randomHeuristicEpisodes.txt @@ -1 +1,2 @@ 1475149153773 refactoring 2B 37 true +1475149706545 test-last 1 338 false diff --git a/.besouro/20160929143835621/zorroEpisodes.txt b/.besouro/20160929143835621/zorroEpisodes.txt index b9d1792..31e1f62 100644 --- a/.besouro/20160929143835621/zorroEpisodes.txt +++ b/.besouro/20160929143835621/zorroEpisodes.txt @@ -1 +1,2 @@ 1475149153773 refactoring 2B 37 false +1475149706545 test-last 1 552 false diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 5e6fd56..772386e 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -11,7 +11,7 @@ public void test() { } @Test - public void testReturn() { + public void testReturnWith_I() { RomanNumerals rm = new RomanNumerals("I"); int number = rm.convertToInteger("I"); assertEquals("I was not 1", 1, number); From f09861d04eb9b24f5493b93a389571abc538be4c Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 15:00:51 +0300 Subject: [PATCH 06/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 13 +++++++++++++ .besouro/20160929143835621/besouroEpisodes.txt | 16 ++++++++++++++++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20160929143835621/zorroEpisodes.txt | 1 + src/RomanNumeralsException.java | 4 ++++ 5 files changed, 35 insertions(+) create mode 100644 src/RomanNumeralsException.java diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index a914c79..eb82e29 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -17,3 +17,16 @@ RefactoringAction 1475149719805 TestRomanNumerals.java RENAME testReturn()=>void RefactoringAction 1475149728324 TestRomanNumerals.java RENAME testReturnWithOne()=>void testReturnWith() METHOD RefactoringAction 1475149729840 TestRomanNumerals.java RENAME testReturnWith()=>void testReturnWith_I() METHOD EditAction 1475149992309 TestRomanNumerals.java 368 2 5 2 +UnitTestCaseAction 1475149993823 TestRomanNumerals.java OK +UnitTestSessionAction 1475149993824 TestRomanNumerals.java OK +RefactoringAction 1475150244923 TestRomanNumerals.java ADD void test FIELD +RefactoringAction 1475150247440 TestRomanNumerals.java RENAME test=>void testReturn FIELD +RefactoringAction 1475150251957 TestRomanNumerals.java RENAME testReturn=>void test FIELD +RefactoringAction 1475150256973 TestRomanNumerals.java RENAME test=>void testMoreThanThree_I FIELD +RefactoringAction 1475150258488 TestRomanNumerals.java RENAME testMoreThanThree_I=>void testMoreThanThree_I_s FIELD +RefactoringAction 1475150261005 TestRomanNumerals.java RENAME testMoreThanThree_I_s=>void testMoreThanThree_I_s() METHOD +RefactoringAction 1475150376755 RomanNumeralsException.java ADD RomanNumeralsException.java CLASS +FileOpenedAction 1475150376902 RomanNumeralsException.java 46 0 0 0 +RefactoringAction 1475150398270 RomanNumeralsException.java ADD long serialVersionUID FIELD +RefactoringAction 1475150401433 RomanNumeralsException.java REMOVE serialVersionUID FIELD +EditAction 1475150451226 RomanNumeralsException.java 63 0 0 0 diff --git a/.besouro/20160929143835621/besouroEpisodes.txt b/.besouro/20160929143835621/besouroEpisodes.txt index 396fca9..dd7b3b4 100644 --- a/.besouro/20160929143835621/besouroEpisodes.txt +++ b/.besouro/20160929143835621/besouroEpisodes.txt @@ -3,3 +3,19 @@ 1475149153775 refactoring 1B 37 true 1475149153776 regression 1 37 true 1475149706545 test-last 1 338 false +1475149993824 refactoring 2B 274 true +1475149993825 refactoring 3 274 true +1475149993826 refactoring 3 274 true +1475149993827 refactoring 1B 274 true +1475149993828 refactoring 3 274 true +1475149993829 refactoring 3 274 true +1475149993830 refactoring 2B 274 true +1475149993831 refactoring 3 274 true +1475149993832 refactoring 1B 274 true +1475149993833 refactoring 3 274 true +1475149993834 regression 1 274 true +1475149993835 refactoring 3 274 true +1475149993836 refactoring 2B 274 true +1475149993837 refactoring 3 274 true +1475149993838 refactoring 1B 274 true +1475149993839 refactoring 3 274 true diff --git a/.besouro/20160929143835621/randomHeuristicEpisodes.txt b/.besouro/20160929143835621/randomHeuristicEpisodes.txt index ee69507..6b1cb6e 100644 --- a/.besouro/20160929143835621/randomHeuristicEpisodes.txt +++ b/.besouro/20160929143835621/randomHeuristicEpisodes.txt @@ -1,2 +1,3 @@ 1475149153773 refactoring 2B 37 true 1475149706545 test-last 1 338 false +1475149993824 refactoring 2B 274 true diff --git a/.besouro/20160929143835621/zorroEpisodes.txt b/.besouro/20160929143835621/zorroEpisodes.txt index 31e1f62..473240d 100644 --- a/.besouro/20160929143835621/zorroEpisodes.txt +++ b/.besouro/20160929143835621/zorroEpisodes.txt @@ -1,2 +1,3 @@ 1475149153773 refactoring 2B 37 false 1475149706545 test-last 1 552 false +1475149993824 refactoring 2B 287 false diff --git a/src/RomanNumeralsException.java b/src/RomanNumeralsException.java new file mode 100644 index 0000000..4a820e8 --- /dev/null +++ b/src/RomanNumeralsException.java @@ -0,0 +1,4 @@ + +public class RomanNumeralsException extends Exception{ + +} From 7b8db1bf7fd64baefd622cf57d37df872e0d34fb Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 15:00:57 +0300 Subject: [PATCH 07/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 1 + src/RomanNumerals.java | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index eb82e29..59684ad 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -30,3 +30,4 @@ FileOpenedAction 1475150376902 RomanNumeralsException.java 46 0 0 0 RefactoringAction 1475150398270 RomanNumeralsException.java ADD long serialVersionUID FIELD RefactoringAction 1475150401433 RomanNumeralsException.java REMOVE serialVersionUID FIELD EditAction 1475150451226 RomanNumeralsException.java 63 0 0 0 +EditAction 1475150456703 RomanNumerals.java 272 2 2 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 2658319..c27b9a9 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -4,11 +4,12 @@ public RomanNumerals(String string) { // TODO Auto-generated constructor stub } - public int convertToInteger(String romanNum) { + public int convertToInteger(String romanNum) throws RomanNumeralsException { // To be Implemented if(romanNum == "I") return 1; return 0; - } + + } From 138676de40a47fae8d0bbe3b15bbbed8d597099a Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 15:00:58 +0300 Subject: [PATCH 08/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 1 + tests/TestRomanNumerals.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 59684ad..dee45b2 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -31,3 +31,4 @@ RefactoringAction 1475150398270 RomanNumeralsException.java ADD long serialVersi RefactoringAction 1475150401433 RomanNumeralsException.java REMOVE serialVersionUID FIELD EditAction 1475150451226 RomanNumeralsException.java 63 0 0 0 EditAction 1475150456703 RomanNumerals.java 272 2 2 0 +EditAction 1475150457915 TestRomanNumerals.java 452 3 5 2 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 772386e..647f2ab 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -16,5 +16,10 @@ public void testReturnWith_I() { int number = rm.convertToInteger("I"); assertEquals("I was not 1", 1, number); } + + @Test + public void testMoreThanThree_I_s() throws RomanNumeralsException { + + } } From 0aa361f731cbccf1f9102396a8e65405cff20c38 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 15:41:21 +0300 Subject: [PATCH 09/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 13 +++ .../20160929143835621/besouroEpisodes.txt | 84 +++++++++++++++++++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20160929143835621/zorroEpisodes.txt | 1 + src/RomanNumerals.java | 18 +++- tests/TestRomanNumerals.java | 13 +-- 6 files changed, 123 insertions(+), 7 deletions(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index dee45b2..e42dbda 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -32,3 +32,16 @@ RefactoringAction 1475150401433 RomanNumeralsException.java REMOVE serialVersion EditAction 1475150451226 RomanNumeralsException.java 63 0 0 0 EditAction 1475150456703 RomanNumerals.java 272 2 2 0 EditAction 1475150457915 TestRomanNumerals.java 452 3 5 2 +CompilationAction 1475150459010 TestRomanNumerals.java +FileOpenedAction 1475150694540 RomanNumeralsException.java 63 0 0 0 +RefactoringAction 1475151414637 RomanNumerals.java RENAME RomanNumerals(String)=>RomanNumerals() METHOD +CompilationAction 1475151666276 TestRomanNumerals.java +UnitTestCaseAction 1475151667677 TestRomanNumerals.java OK +UnitTestSessionAction 1475151667678 TestRomanNumerals.java OK +RefactoringAction 1475151728099 RomanNumerals.java ADD boolean test FIELD +RefactoringAction 1475151734613 RomanNumerals.java RENAME test=>boolean testR FIELD +RefactoringAction 1475151735629 RomanNumerals.java RENAME testR=>boolean testRea FIELD +RefactoringAction 1475151740143 RomanNumerals.java RENAME testRea=>boolean testRepeatedTooManyTimes() METHOD +RefactoringAction 1475151745170 RomanNumerals.java RENAME testRepeatedTooManyTimes()=>boolean testRepeatedTooManyTimes(string) METHOD +RefactoringAction 1475151749684 RomanNumerals.java RENAME testRepeatedTooManyTimes(string)=>boolean testRepeatedTooManyTimes(String) METHOD +EditAction 1475152881098 RomanNumerals.java 833 3 7 0 diff --git a/.besouro/20160929143835621/besouroEpisodes.txt b/.besouro/20160929143835621/besouroEpisodes.txt index dd7b3b4..0b14d38 100644 --- a/.besouro/20160929143835621/besouroEpisodes.txt +++ b/.besouro/20160929143835621/besouroEpisodes.txt @@ -19,3 +19,87 @@ 1475149993837 refactoring 3 274 true 1475149993838 refactoring 1B 274 true 1475149993839 refactoring 3 274 true +1475151667678 refactoring 3 1422 true +1475151667679 refactoring 3 1422 true +1475151667680 refactoring 3 1422 true +1475151667681 refactoring 3 1422 true +1475151667682 refactoring 3 1422 true +1475151667683 refactoring 3 1422 true +1475151667684 refactoring 3 1422 true +1475151667685 refactoring 3 1422 true +1475151667686 refactoring 3 1422 true +1475151667687 refactoring 3 1422 true +1475151667688 refactoring 3 1422 true +1475151667689 refactoring 3 1422 true +1475151667690 refactoring 3 1422 true +1475151667691 refactoring 3 1422 true +1475151667692 refactoring 3 1422 true +1475151667693 refactoring 3 1422 true +1475151667694 refactoring 3 1422 true +1475151667695 refactoring 3 1422 true +1475151667696 refactoring 3 1422 true +1475151667697 refactoring 3 1422 true +1475151667698 refactoring 3 1422 true +1475151667699 refactoring 3 1422 true +1475151667700 refactoring 3 1422 true +1475151667701 refactoring 3 1422 true +1475151667702 refactoring 3 1422 true +1475151667703 refactoring 3 1422 true +1475151667704 refactoring 3 1422 true +1475151667705 refactoring 3 1422 true +1475151667706 refactoring 3 1422 true +1475151667707 refactoring 3 1422 true +1475151667708 refactoring 3 1422 true +1475151667709 refactoring 3 1422 true +1475151667710 refactoring 3 1422 true +1475151667711 refactoring 3 1422 true +1475151667712 refactoring 3 1422 true +1475151667713 refactoring 3 1422 true +1475151667714 refactoring 3 1422 true +1475151667715 refactoring 3 1422 true +1475151667716 refactoring 3 1422 true +1475151667717 refactoring 3 1422 true +1475151667718 refactoring 3 1422 true +1475151667719 refactoring 3 1422 true +1475151667720 refactoring 3 1422 true +1475151667721 refactoring 3 1422 true +1475151667722 refactoring 3 1422 true +1475151667723 refactoring 3 1422 true +1475151667724 refactoring 3 1422 true +1475151667725 refactoring 3 1422 true +1475151667726 refactoring 3 1422 true +1475151667727 refactoring 3 1422 true +1475151667728 refactoring 3 1422 true +1475151667729 refactoring 3 1422 true +1475151667730 refactoring 3 1422 true +1475151667731 refactoring 3 1422 true +1475151667732 refactoring 3 1422 true +1475151667733 refactoring 3 1422 true +1475151667734 refactoring 3 1422 true +1475151667735 refactoring 3 1422 true +1475151667736 refactoring 3 1422 true +1475151667737 refactoring 3 1422 true +1475151667738 refactoring 3 1422 true +1475151667739 refactoring 3 1422 true +1475151667740 refactoring 3 1422 true +1475151667741 refactoring 3 1422 true +1475151667742 refactoring 3 1422 true +1475151667743 refactoring 3 1422 true +1475151667744 refactoring 3 1422 true +1475151667745 refactoring 3 1422 true +1475151667746 refactoring 3 1422 true +1475151667747 refactoring 3 1422 true +1475151667748 refactoring 3 1422 true +1475151667749 refactoring 3 1422 true +1475151667750 refactoring 3 1422 true +1475151667751 refactoring 3 1422 true +1475151667752 refactoring 3 1422 true +1475151667753 refactoring 3 1422 true +1475151667754 refactoring 3 1422 true +1475151667755 refactoring 3 1422 true +1475151667756 refactoring 3 1422 true +1475151667757 refactoring 3 1422 true +1475151667758 refactoring 3 1422 true +1475151667759 refactoring 3 1422 true +1475151667760 refactoring 3 1422 true +1475151667761 refactoring 3 1422 true diff --git a/.besouro/20160929143835621/randomHeuristicEpisodes.txt b/.besouro/20160929143835621/randomHeuristicEpisodes.txt index 6b1cb6e..60f2774 100644 --- a/.besouro/20160929143835621/randomHeuristicEpisodes.txt +++ b/.besouro/20160929143835621/randomHeuristicEpisodes.txt @@ -1,3 +1,4 @@ 1475149153773 refactoring 2B 37 true 1475149706545 test-last 1 338 false 1475149993824 refactoring 2B 274 true +1475151667678 refactoring 3 1422 false diff --git a/.besouro/20160929143835621/zorroEpisodes.txt b/.besouro/20160929143835621/zorroEpisodes.txt index 473240d..37cbd03 100644 --- a/.besouro/20160929143835621/zorroEpisodes.txt +++ b/.besouro/20160929143835621/zorroEpisodes.txt @@ -1,3 +1,4 @@ 1475149153773 refactoring 2B 37 false 1475149706545 test-last 1 552 false 1475149993824 refactoring 2B 287 false +1475151667678 refactoring 3 1673 false diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index c27b9a9..a836a48 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -1,15 +1,31 @@ public class RomanNumerals { - public RomanNumerals(String string) { + public RomanNumerals(){ // TODO Auto-generated constructor stub + //Tables for roman numerals and numbers should be added here } public int convertToInteger(String romanNum) throws RomanNumeralsException { // To be Implemented + //Test for too many "I, X, C, M" returns true if too many + if(testRepeatedTooManyTimes(romanNum)) throw new RomanNumeralsException(); + + if(romanNum == "IIII") throw new RomanNumeralsException(); if(romanNum == "I") return 1; return 0; } + //Return false if one of the letters is repeated too many times + public boolean testRepeatedTooManyTimes(String roman){ + //Test if there is a possibility for too many of the same number + if(roman.length() < 4 ) return false; + + //Test the obvious + if(roman == "IIII") return true; + + return false; + } + } diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 647f2ab..11d10d5 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -5,21 +5,22 @@ public class TestRomanNumerals { @Test - public void test() { - RomanNumerals rm = new RomanNumerals("I"); + public void test() throws RomanNumeralsException { + RomanNumerals rm = new RomanNumerals(); assertNotNull(rm); } @Test - public void testReturnWith_I() { - RomanNumerals rm = new RomanNumerals("I"); + public void testReturnWith_I() throws RomanNumeralsException{ + RomanNumerals rm = new RomanNumerals(); int number = rm.convertToInteger("I"); assertEquals("I was not 1", 1, number); } - @Test + @Test (expected = RomanNumeralsException.class) public void testMoreThanThree_I_s() throws RomanNumeralsException { - + RomanNumerals rm = new RomanNumerals(); + rm.convertToInteger("IIII"); } } From ec7d8118f528a03ec25517d36de6e3ea4e5f82f3 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 15:43:50 +0300 Subject: [PATCH 10/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 5 +++++ src/RomanNumerals.java | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index e42dbda..eb8d806 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -45,3 +45,8 @@ RefactoringAction 1475151740143 RomanNumerals.java RENAME testRea=>boolean testR RefactoringAction 1475151745170 RomanNumerals.java RENAME testRepeatedTooManyTimes()=>boolean testRepeatedTooManyTimes(string) METHOD RefactoringAction 1475151749684 RomanNumerals.java RENAME testRepeatedTooManyTimes(string)=>boolean testRepeatedTooManyTimes(String) METHOD EditAction 1475152881098 RomanNumerals.java 833 3 7 0 +UnitTestCaseAction 1475152883417 TestRomanNumerals.java OK +UnitTestSessionAction 1475152883418 TestRomanNumerals.java OK +RefactoringAction 1475152917916 TestRomanNumerals.java ADD void testMoreThanThree_I_s()/2 METHOD +RefactoringAction 1475152922431 TestRomanNumerals.java RENAME testMoreThanThree_I_s()/2=>void testMoreThanThree_X_s() METHOD +EditAction 1475153030093 RomanNumerals.java 893 3 7 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index a836a48..f2fb15b 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -22,7 +22,8 @@ public boolean testRepeatedTooManyTimes(String roman){ if(roman.length() < 4 ) return false; //Test the obvious - if(roman == "IIII") return true; + if(roman == "IIII" || roman == "XXXX" || roman == "CCCC" || roman == "MMMM") return true; + return false; } From 0c0e51ec8d61f85e0134362d3fd00c733aa0e9d7 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 15:43:51 +0300 Subject: [PATCH 11/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index eb8d806..74cd3b9 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -50,3 +50,4 @@ UnitTestSessionAction 1475152883418 TestRomanNumerals.java OK RefactoringAction 1475152917916 TestRomanNumerals.java ADD void testMoreThanThree_I_s()/2 METHOD RefactoringAction 1475152922431 TestRomanNumerals.java RENAME testMoreThanThree_I_s()/2=>void testMoreThanThree_X_s() METHOD EditAction 1475153030093 RomanNumerals.java 893 3 7 0 +EditAction 1475153031262 TestRomanNumerals.java 813 4 9 2 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 11d10d5..f1dc2cf 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -22,5 +22,11 @@ public void testMoreThanThree_I_s() throws RomanNumeralsException { RomanNumerals rm = new RomanNumerals(); rm.convertToInteger("IIII"); } + + @Test (expected = RomanNumeralsException.class) + public void testMoreThanThree_X_s() throws RomanNumeralsException { + RomanNumerals rm = new RomanNumerals(); + rm.convertToInteger("XXXX"); + } } From be315beb70fea55592d88f0a2aed4512f146a3bb Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 15:44:42 +0300 Subject: [PATCH 12/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 7 +++++++ tests/TestRomanNumerals.java | 11 +++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 74cd3b9..5af57de 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -51,3 +51,10 @@ RefactoringAction 1475152917916 TestRomanNumerals.java ADD void testMoreThanThre RefactoringAction 1475152922431 TestRomanNumerals.java RENAME testMoreThanThree_I_s()/2=>void testMoreThanThree_X_s() METHOD EditAction 1475153030093 RomanNumerals.java 893 3 7 0 EditAction 1475153031262 TestRomanNumerals.java 813 4 9 2 +UnitTestCaseAction 1475153032867 TestRomanNumerals.java OK +UnitTestSessionAction 1475153032869 TestRomanNumerals.java OK +RefactoringAction 1475153049469 TestRomanNumerals.java RENAME testMoreThanThree_I_s()=>void testMoreThanThree_I__s() METHOD +RefactoringAction 1475153050984 TestRomanNumerals.java RENAME testMoreThanThree_I__s()=>void testMoreThanThree_I_X FIELD +RefactoringAction 1475153054510 TestRomanNumerals.java RENAME testMoreThanThree_I_X_C__s()=>void testMoreThanThree_I_X_C_M_s() METHOD +RefactoringAction 1475153081605 TestRomanNumerals.java REMOVE testMoreThanThree_X_s() METHOD +EditAction 1475153082410 TestRomanNumerals.java 720 3 10 2 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index f1dc2cf..ce7bfe7 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -18,15 +18,14 @@ public void testReturnWith_I() throws RomanNumeralsException{ } @Test (expected = RomanNumeralsException.class) - public void testMoreThanThree_I_s() throws RomanNumeralsException { + public void testMoreThanThree_I_X_C_M_s() throws RomanNumeralsException { RomanNumerals rm = new RomanNumerals(); rm.convertToInteger("IIII"); - } - - @Test (expected = RomanNumeralsException.class) - public void testMoreThanThree_X_s() throws RomanNumeralsException { - RomanNumerals rm = new RomanNumerals(); rm.convertToInteger("XXXX"); + rm.convertToInteger("CCCC"); + rm.convertToInteger("MMMM"); } + + } From 5ac88850f450a3efcec2c391843deb1d56e60ca1 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 15:51:17 +0300 Subject: [PATCH 13/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 9 +++++++++ tests/TestRomanNumerals.java | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 5af57de..5a340b6 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -58,3 +58,12 @@ RefactoringAction 1475153050984 TestRomanNumerals.java RENAME testMoreThanThree_ RefactoringAction 1475153054510 TestRomanNumerals.java RENAME testMoreThanThree_I_X_C__s()=>void testMoreThanThree_I_X_C_M_s() METHOD RefactoringAction 1475153081605 TestRomanNumerals.java REMOVE testMoreThanThree_X_s() METHOD EditAction 1475153082410 TestRomanNumerals.java 720 3 10 2 +UnitTestCaseAction 1475153084123 TestRomanNumerals.java OK +UnitTestSessionAction 1475153084124 TestRomanNumerals.java OK +RefactoringAction 1475153424193 TestRomanNumerals.java ADD void testmore FIELD +RefactoringAction 1475153427208 TestRomanNumerals.java REMOVE testmore FIELD +RefactoringAction 1475153428720 TestRomanNumerals.java ADD void test FIELD +RefactoringAction 1475153433236 TestRomanNumerals.java RENAME test=>void testThree FIELD +RefactoringAction 1475153439749 TestRomanNumerals.java RENAME testThree=>void testThree_I_X_C_M FIELD +RefactoringAction 1475153442263 TestRomanNumerals.java RENAME testThree_I_X_C_M=>void testThree_I_X_C_M_s() METHOD +EditAction 1475153477506 TestRomanNumerals.java 961 4 15 2 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index ce7bfe7..e2951ac 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -26,6 +26,15 @@ public void testMoreThanThree_I_X_C_M_s() throws RomanNumeralsException { rm.convertToInteger("MMMM"); } + @Test + public void testThree_I_X_C_M_s() throws RomanNumeralsException { + RomanNumerals rm = new RomanNumerals(); + rm.convertToInteger("III"); + rm.convertToInteger("XXX"); + rm.convertToInteger("CCC"); + rm.convertToInteger("MMM"); + } + } From 91bc3a4795b586c17fd8e93641ce342ae5cc8c49 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 16:01:33 +0300 Subject: [PATCH 14/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 11 +++++++++++ src/RomanNumerals.java | 16 ++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 5a340b6..b2ed100 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -67,3 +67,14 @@ RefactoringAction 1475153433236 TestRomanNumerals.java RENAME test=>void testThr RefactoringAction 1475153439749 TestRomanNumerals.java RENAME testThree=>void testThree_I_X_C_M FIELD RefactoringAction 1475153442263 TestRomanNumerals.java RENAME testThree_I_X_C_M=>void testThree_I_X_C_M_s() METHOD EditAction 1475153477506 TestRomanNumerals.java 961 4 15 2 +UnitTestCaseAction 1475153478987 TestRomanNumerals.java OK +UnitTestSessionAction 1475153478989 TestRomanNumerals.java OK +RefactoringAction 1475153637399 TestRomanNumerals.java ADD void test FIELD +RefactoringAction 1475153640419 TestRomanNumerals.java RENAME test=>void testRepetition FIELD +RefactoringAction 1475153641933 TestRomanNumerals.java RENAME testRepetition=>void testRepetition_ FIELD +RefactoringAction 1475153645948 TestRomanNumerals.java RENAME testRepetition_=>void testRepetition_V_L_D FIELD +RefactoringAction 1475153648462 TestRomanNumerals.java RENAME testRepetition_V_L_D=>void testRepetition_V_L_D_s() METHOD +RefactoringAction 1475153894825 RomanNumerals.java ADD boolean testSameRepeatedTooManyTimes() METHOD +RefactoringAction 1475153902350 RomanNumerals.java RENAME testSameRepeatedTooManyTimes()=>boolean testSameRepeatedTooManyTimesromanNum FIELD +RefactoringAction 1475153904364 RomanNumerals.java RENAME testSameRepeatedTooManyTimesromanNum=>boolean testSameRepeatedTooManyTimes(String) METHOD +EditAction 1475154092674 RomanNumerals.java 1299 4 10 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index f2fb15b..fb169b7 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -9,14 +9,14 @@ public int convertToInteger(String romanNum) throws RomanNumeralsException { // To be Implemented //Test for too many "I, X, C, M" returns true if too many if(testRepeatedTooManyTimes(romanNum)) throw new RomanNumeralsException(); - + if(testSameRepeatedTooManyTimes(romanNum)) throw new RomanNumeralsException(); if(romanNum == "IIII") throw new RomanNumeralsException(); if(romanNum == "I") return 1; return 0; } - //Return false if one of the letters is repeated too many times + //Return true if one of the letters is repeated too many times public boolean testRepeatedTooManyTimes(String roman){ //Test if there is a possibility for too many of the same number if(roman.length() < 4 ) return false; @@ -28,5 +28,17 @@ public boolean testRepeatedTooManyTimes(String roman){ return false; } + //Return true if letter appears too many times + public boolean testSameRepeatedTooManyTimes(String romanNum){ + //Test if the romanNumber got any letters that cant exists more than once + if(romanNum.contains("V") || romanNum.contains("L") || romanNum.contains("D")) { + } else { + return false; + } + + return false; + + } + } From 4cb99747417bfc8583c72f880f2d22a944c53abc Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 16:01:34 +0300 Subject: [PATCH 15/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 1 + tests/TestRomanNumerals.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index b2ed100..431bf2a 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -78,3 +78,4 @@ RefactoringAction 1475153894825 RomanNumerals.java ADD boolean testSameRepeatedT RefactoringAction 1475153902350 RomanNumerals.java RENAME testSameRepeatedTooManyTimes()=>boolean testSameRepeatedTooManyTimesromanNum FIELD RefactoringAction 1475153904364 RomanNumerals.java RENAME testSameRepeatedTooManyTimesromanNum=>boolean testSameRepeatedTooManyTimes(String) METHOD EditAction 1475154092674 RomanNumerals.java 1299 4 10 0 +EditAction 1475154094053 TestRomanNumerals.java 1157 5 17 2 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index e2951ac..44929ff 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -35,6 +35,12 @@ public void testThree_I_X_C_M_s() throws RomanNumeralsException { rm.convertToInteger("MMM"); } + @Test (expected = RomanNumeralsException.class) + public void testRepetition_V_L_D_s() throws RomanNumeralsException { + RomanNumerals rm = new RomanNumerals(); + rm.convertToInteger("VVV"); + } + } From 3bfc981d6eb3aed92ab183fd79dc8a95b052e8f2 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 16:01:51 +0300 Subject: [PATCH 16/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 3 +++ tests/TestRomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 431bf2a..1977a85 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -79,3 +79,6 @@ RefactoringAction 1475153902350 RomanNumerals.java RENAME testSameRepeatedTooMan RefactoringAction 1475153904364 RomanNumerals.java RENAME testSameRepeatedTooManyTimesromanNum=>boolean testSameRepeatedTooManyTimes(String) METHOD EditAction 1475154092674 RomanNumerals.java 1299 4 10 0 EditAction 1475154094053 TestRomanNumerals.java 1157 5 17 2 +UnitTestCaseAction 1475154097132 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475154097133 TestRomanNumerals.java FAIL +EditAction 1475154110991 TestRomanNumerals.java 1159 5 17 2 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 44929ff..fb3b39c 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -35,7 +35,7 @@ public void testThree_I_X_C_M_s() throws RomanNumeralsException { rm.convertToInteger("MMM"); } - @Test (expected = RomanNumeralsException.class) + @Test //(expected = RomanNumeralsException.class) public void testRepetition_V_L_D_s() throws RomanNumeralsException { RomanNumerals rm = new RomanNumerals(); rm.convertToInteger("VVV"); From 4309415dd15e01ba8fc6adb0e4a20a169ac169ee Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 16:09:00 +0300 Subject: [PATCH 17/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 3 +++ src/RomanNumerals.java | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 1977a85..6110100 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -82,3 +82,6 @@ EditAction 1475154094053 TestRomanNumerals.java 1157 5 17 2 UnitTestCaseAction 1475154097132 TestRomanNumerals.java FAIL UnitTestSessionAction 1475154097133 TestRomanNumerals.java FAIL EditAction 1475154110991 TestRomanNumerals.java 1159 5 17 2 +UnitTestCaseAction 1475154112711 TestRomanNumerals.java OK +UnitTestSessionAction 1475154112712 TestRomanNumerals.java OK +EditAction 1475154539579 RomanNumerals.java 1658 4 15 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index fb169b7..f55d2fe 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -31,10 +31,20 @@ public boolean testRepeatedTooManyTimes(String roman){ //Return true if letter appears too many times public boolean testSameRepeatedTooManyTimes(String romanNum){ //Test if the romanNumber got any letters that cant exists more than once - if(romanNum.contains("V") || romanNum.contains("L") || romanNum.contains("D")) { - } else { - return false; + if(!(romanNum.contains("V") || romanNum.contains("L") || romanNum.contains("D"))) return false; + + //Lets count the different letters on the romanNum + int V_counter = 0; + int L_counter = 0; + int D_counter = 0; + + for(int i=0; i 1 || L_counter > 1 || D_counter > 1) return true; + return false; From e5299d850943b77c31a54306f5534a3b7b8f9c2f Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 16:09:01 +0300 Subject: [PATCH 18/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 1 + tests/TestRomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 6110100..023c52b 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -85,3 +85,4 @@ EditAction 1475154110991 TestRomanNumerals.java 1159 5 17 2 UnitTestCaseAction 1475154112711 TestRomanNumerals.java OK UnitTestSessionAction 1475154112712 TestRomanNumerals.java OK EditAction 1475154539579 RomanNumerals.java 1658 4 15 0 +EditAction 1475154540997 TestRomanNumerals.java 1157 5 17 2 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index fb3b39c..44929ff 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -35,7 +35,7 @@ public void testThree_I_X_C_M_s() throws RomanNumeralsException { rm.convertToInteger("MMM"); } - @Test //(expected = RomanNumeralsException.class) + @Test (expected = RomanNumeralsException.class) public void testRepetition_V_L_D_s() throws RomanNumeralsException { RomanNumerals rm = new RomanNumerals(); rm.convertToInteger("VVV"); From 3af78cf0b0fc9171636157fcb066fcaa3e477328 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 16:09:37 +0300 Subject: [PATCH 19/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 3 +++ tests/TestRomanNumerals.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 023c52b..122872c 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -86,3 +86,6 @@ UnitTestCaseAction 1475154112711 TestRomanNumerals.java OK UnitTestSessionAction 1475154112712 TestRomanNumerals.java OK EditAction 1475154539579 RomanNumerals.java 1658 4 15 0 EditAction 1475154540997 TestRomanNumerals.java 1157 5 17 2 +UnitTestCaseAction 1475154542570 TestRomanNumerals.java OK +UnitTestSessionAction 1475154542571 TestRomanNumerals.java OK +EditAction 1475154577456 TestRomanNumerals.java 1217 5 19 2 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 44929ff..7da4e91 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -39,6 +39,8 @@ public void testThree_I_X_C_M_s() throws RomanNumeralsException { public void testRepetition_V_L_D_s() throws RomanNumeralsException { RomanNumerals rm = new RomanNumerals(); rm.convertToInteger("VVV"); + rm.convertToInteger("LL"); + rm.convertToInteger("DDDD"); } From 901863abc8316f646b6508b8f3a9bc90d4170f05 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 16:11:29 +0300 Subject: [PATCH 20/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 5 +++++ tests/TestRomanNumerals.java | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 122872c..741c3c4 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -89,3 +89,8 @@ EditAction 1475154540997 TestRomanNumerals.java 1157 5 17 2 UnitTestCaseAction 1475154542570 TestRomanNumerals.java OK UnitTestSessionAction 1475154542571 TestRomanNumerals.java OK EditAction 1475154577456 TestRomanNumerals.java 1217 5 19 2 +UnitTestCaseAction 1475154579192 TestRomanNumerals.java OK +UnitTestSessionAction 1475154579193 TestRomanNumerals.java OK +RefactoringAction 1475154675259 TestRomanNumerals.java ADD void testRepetition_V_L_D_s()/2 METHOD +RefactoringAction 1475154682284 TestRomanNumerals.java RENAME testRepetition_V_L_D_s()/2=>void testRepetition_V_L_D_s_pass() METHOD +EditAction 1475154688847 TestRomanNumerals.java 1434 6 23 2 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 7da4e91..67189ed 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -43,6 +43,15 @@ public void testRepetition_V_L_D_s() throws RomanNumeralsException { rm.convertToInteger("DDDD"); } + @Test + public void testRepetition_V_L_D_s_pass() throws RomanNumeralsException { + RomanNumerals rm = new RomanNumerals(); + rm.convertToInteger("V"); + rm.convertToInteger("L"); + rm.convertToInteger("D"); + } + + } From d60233455b83c54dfb905e8be5a3a2fc7161c434 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 16:22:07 +0300 Subject: [PATCH 21/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 8 ++++++++ tests/TestRomanNumerals.java | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 741c3c4..a3effba 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -94,3 +94,11 @@ UnitTestSessionAction 1475154579193 TestRomanNumerals.java OK RefactoringAction 1475154675259 TestRomanNumerals.java ADD void testRepetition_V_L_D_s()/2 METHOD RefactoringAction 1475154682284 TestRomanNumerals.java RENAME testRepetition_V_L_D_s()/2=>void testRepetition_V_L_D_s_pass() METHOD EditAction 1475154688847 TestRomanNumerals.java 1434 6 23 2 +UnitTestCaseAction 1475154690642 TestRomanNumerals.java OK +UnitTestSessionAction 1475154690643 TestRomanNumerals.java OK +RefactoringAction 1475154705857 TestRomanNumerals.java ADD void testRepetition_V_L_D_s()/2 METHOD +RefactoringAction 1475154715371 TestRomanNumerals.java RENAME testRepetition_V_L_D_s()/2=>void testSubs() METHOD +RefactoringAction 1475154717884 TestRomanNumerals.java RENAME testSubs()=>void testSubtraction() METHOD +RefactoringAction 1475154718897 TestRomanNumerals.java RENAME testSubtraction()=>void testSubtractionFrom() METHOD +RefactoringAction 1475154723913 TestRomanNumerals.java RENAME testSubtractionFrom()=>void testSubtractionFrom2NextHighest() METHOD +EditAction 1475155327410 TestRomanNumerals.java 1635 7 25 2 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index 67189ed..d87fc7e 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -50,7 +50,12 @@ public void testRepetition_V_L_D_s_pass() throws RomanNumeralsException { rm.convertToInteger("L"); rm.convertToInteger("D"); } - + + @Test (expected = RomanNumeralsException.class) + public void testSubtractionFrom2NextHighest() throws RomanNumeralsException { + RomanNumerals rm = new RomanNumerals(); + rm.convertToInteger("IX"); + } From 96fa7ae90e04b1d07e67c987effa7358e8902d28 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 16:25:26 +0300 Subject: [PATCH 22/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 5 +++ src/RomanNumerals.java | 44 ++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index a3effba..757173c 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -102,3 +102,8 @@ RefactoringAction 1475154717884 TestRomanNumerals.java RENAME testSubs()=>void t RefactoringAction 1475154718897 TestRomanNumerals.java RENAME testSubtraction()=>void testSubtractionFrom() METHOD RefactoringAction 1475154723913 TestRomanNumerals.java RENAME testSubtractionFrom()=>void testSubtractionFrom2NextHighest() METHOD EditAction 1475155327410 TestRomanNumerals.java 1635 7 25 2 +UnitTestCaseAction 1475155328941 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475155328942 TestRomanNumerals.java FAIL +RefactoringAction 1475155418755 RomanNumerals.java ADD static int decodeSingle(char) METHOD +RefactoringAction 1475155439331 RomanNumerals.java ADD static int decode(String) METHOD +EditAction 1475155526088 RomanNumerals.java 2903 6 21 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index f55d2fe..df9bb73 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -11,11 +11,51 @@ public int convertToInteger(String romanNum) throws RomanNumeralsException { if(testRepeatedTooManyTimes(romanNum)) throw new RomanNumeralsException(); if(testSameRepeatedTooManyTimes(romanNum)) throw new RomanNumeralsException(); if(romanNum == "IIII") throw new RomanNumeralsException(); - if(romanNum == "I") return 1; - return 0; + //If every test pass then we can decode the roman to arabic + int number = decode(romanNum); + return number; } + //Roman numerals to decimal + //Source http://stackoverflow.com/questions/20313254/roman-numeral-to-number-conversion + private static int decodeSingle(char letter) { + switch (letter) { + case 'M': + return 1000; + case 'D': + return 500; + case 'C': + return 100; + case 'L': + return 50; + case 'X': + return 10; + case 'V': + return 5; + case 'I': + return 1; + default: + return 0; + } + } + + public static int decode(String roman) { + int result = 0; + String uRoman = roman.toUpperCase(); //case-insensitive + for (int i = 0; i < uRoman.length() - 1; i++) {//loop over all but the last character + if (decodeSingle(uRoman.charAt(i)) < decodeSingle(uRoman.charAt(i + 1))) { + result -= decodeSingle(uRoman.charAt(i)); + } else { + result += decodeSingle(uRoman.charAt(i)); + } + } + result += decodeSingle(uRoman.charAt(uRoman.length() - 1)); + return result; + } + + + //Return true if one of the letters is repeated too many times public boolean testRepeatedTooManyTimes(String roman){ //Test if there is a possibility for too many of the same number From 6a4532c1e35fe915c4fa0305af84f53f927f003a Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 16:27:41 +0300 Subject: [PATCH 23/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 6 ++++++ tests/TestRomanNumerals.java | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 757173c..84fca7b 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -107,3 +107,9 @@ UnitTestSessionAction 1475155328942 TestRomanNumerals.java FAIL RefactoringAction 1475155418755 RomanNumerals.java ADD static int decodeSingle(char) METHOD RefactoringAction 1475155439331 RomanNumerals.java ADD static int decode(String) METHOD EditAction 1475155526088 RomanNumerals.java 2903 6 21 0 +UnitTestCaseAction 1475155527623 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475155527624 TestRomanNumerals.java FAIL +RefactoringAction 1475155559573 TestRomanNumerals.java ADD void test FIELD +RefactoringAction 1475155562086 TestRomanNumerals.java RENAME test=>void testBig FIELD +RefactoringAction 1475155571602 TestRomanNumerals.java RENAME testBig=>void testBigNumber() METHOD +EditAction 1475155661282 TestRomanNumerals.java 1862 8 28 3 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index d87fc7e..a92bcea 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -57,6 +57,13 @@ public void testSubtractionFrom2NextHighest() throws RomanNumeralsException { rm.convertToInteger("IX"); } + @Test + public void testBigNumber() throws RomanNumeralsException { + RomanNumerals rm = new RomanNumerals(); + int number = rm.convertToInteger("MCMLXXXIV"); + assertEquals("Expected MCMLXXXIV to be 1984", 1984, number); + } + } From b1b0aab4ec78a8b64e16fd9bb9e27b2f7cf9df44 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 16:30:06 +0300 Subject: [PATCH 24/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 3 +++ src/RomanNumerals.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 84fca7b..0b49f31 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -113,3 +113,6 @@ RefactoringAction 1475155559573 TestRomanNumerals.java ADD void test FIELD RefactoringAction 1475155562086 TestRomanNumerals.java RENAME test=>void testBig FIELD RefactoringAction 1475155571602 TestRomanNumerals.java RENAME testBig=>void testBigNumber() METHOD EditAction 1475155661282 TestRomanNumerals.java 1862 8 28 3 +UnitTestCaseAction 1475155662833 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475155662840 TestRomanNumerals.java FAIL +EditAction 1475155805684 RomanNumerals.java 2990 6 21 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index df9bb73..a624d1b 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -39,7 +39,7 @@ private static int decodeSingle(char letter) { return 0; } } - + //Source http://stackoverflow.com/questions/20313254/roman-numeral-to-number-conversion public static int decode(String roman) { int result = 0; String uRoman = roman.toUpperCase(); //case-insensitive From aa67dc74813d2106bd6ed878902fda798a20b4c2 Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 16:30:07 +0300 Subject: [PATCH 25/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 1 + tests/TestRomanNumerals.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index 0b49f31..ba022d4 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -116,3 +116,4 @@ EditAction 1475155661282 TestRomanNumerals.java 1862 8 28 3 UnitTestCaseAction 1475155662833 TestRomanNumerals.java FAIL UnitTestSessionAction 1475155662840 TestRomanNumerals.java FAIL EditAction 1475155805684 RomanNumerals.java 2990 6 21 0 +EditAction 1475155806921 TestRomanNumerals.java 1862 8 28 3 diff --git a/tests/TestRomanNumerals.java b/tests/TestRomanNumerals.java index a92bcea..f64995d 100644 --- a/tests/TestRomanNumerals.java +++ b/tests/TestRomanNumerals.java @@ -54,7 +54,7 @@ public void testRepetition_V_L_D_s_pass() throws RomanNumeralsException { @Test (expected = RomanNumeralsException.class) public void testSubtractionFrom2NextHighest() throws RomanNumeralsException { RomanNumerals rm = new RomanNumerals(); - rm.convertToInteger("IX"); + rm.convertToInteger("IL"); } @Test From 3f92515f77986f5026c85a5bb97839d4eebd9a9b Mon Sep 17 00:00:00 2001 From: somename Date: Thu, 29 Sep 2016 16:35:35 +0300 Subject: [PATCH 26/28] besouro automatic message --- .besouro/20160929143835621/actions.txt | 13 +++++++++++++ src/RomanNumerals.java | 19 +++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index ba022d4..c54dc37 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -117,3 +117,16 @@ UnitTestCaseAction 1475155662833 TestRomanNumerals.java FAIL UnitTestSessionAction 1475155662840 TestRomanNumerals.java FAIL EditAction 1475155805684 RomanNumerals.java 2990 6 21 0 EditAction 1475155806921 TestRomanNumerals.java 1862 8 28 3 +UnitTestCaseAction 1475155808558 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475155808559 TestRomanNumerals.java FAIL +RefactoringAction 1475155856629 RomanNumerals.java REMOVE decodeSingle(char) METHOD +RefactoringAction 1475155856630 RomanNumerals.java REMOVE testRepeatedTooManyTimes(String) METHOD +RefactoringAction 1475155856631 RomanNumerals.java REMOVE decode(String) METHOD +RefactoringAction 1475155856633 RomanNumerals.java REMOVE testSameRepeatedTooManyTimes(String) METHOD +RefactoringAction 1475155860728 RomanNumerals.java ADD static int decodeSingle(char) METHOD +RefactoringAction 1475155860729 RomanNumerals.java ADD static int decode(String) METHOD +RefactoringAction 1475155860729 RomanNumerals.java ADD boolean testRepeatedTooManyTimes(String) METHOD +RefactoringAction 1475155860730 RomanNumerals.java ADD boolean testSameRepeatedTooManyTimes(String) METHOD +RefactoringAction 1475156005119 RomanNumerals.java ADD void testFirstSubtractedOnlyTwoNextSecondHighest() METHOD +RefactoringAction 1475156009136 RomanNumerals.java RENAME testFirstSubtractedOnlyTwoNextSecondHighest()=>void testFirstSubtractedOnlyTwoNextSecondHighest(String) METHOD +EditAction 1475156134779 RomanNumerals.java 3516 7 22 0 diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index a624d1b..6b7fc99 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -9,7 +9,15 @@ public int convertToInteger(String romanNum) throws RomanNumeralsException { // To be Implemented //Test for too many "I, X, C, M" returns true if too many if(testRepeatedTooManyTimes(romanNum)) throw new RomanNumeralsException(); + /*Test if same letter is repeated too many times. + *Returns true if it was repeated too many times + */ if(testSameRepeatedTooManyTimes(romanNum)) throw new RomanNumeralsException(); + /* + * Test if symbols "I, X and C" are subtracted only from the 2 next highest values + * returns true if failed + */ + if(testFirstSubtractedOnlyTwoNextSecondHighest(romanNum)) throw new RomanNumeralsException(); if(romanNum == "IIII") throw new RomanNumeralsException(); //If every test pass then we can decode the roman to arabic @@ -83,11 +91,18 @@ public boolean testSameRepeatedTooManyTimes(String romanNum){ if(romanNum.charAt(i) == 'L') L_counter++; if(romanNum.charAt(i) == 'D') D_counter++; } - if(V_counter > 1 || L_counter > 1 || D_counter > 1) return true; + //Returns true if V, L OR D appeared more than once. Otherwise returns false + if(V_counter > 1 || L_counter > 1 || D_counter > 1) { + return true; + } else { + return false; + } + } + + public boolean testFirstSubtractedOnlyTwoNextSecondHighest(String romanNum){ return false; - } From 15f9fc84cf3512bcc32a8c27a4a240b402f03a34 Mon Sep 17 00:00:00 2001 From: tsalmela Date: Thu, 29 Sep 2016 16:46:04 +0300 Subject: [PATCH 27/28] Project finished --- .besouro/20160929143835621/actions.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.besouro/20160929143835621/actions.txt b/.besouro/20160929143835621/actions.txt index c54dc37..9f91eb9 100644 --- a/.besouro/20160929143835621/actions.txt +++ b/.besouro/20160929143835621/actions.txt @@ -130,3 +130,5 @@ RefactoringAction 1475155860730 RomanNumerals.java ADD boolean testSameRepeatedT RefactoringAction 1475156005119 RomanNumerals.java ADD void testFirstSubtractedOnlyTwoNextSecondHighest() METHOD RefactoringAction 1475156009136 RomanNumerals.java RENAME testFirstSubtractedOnlyTwoNextSecondHighest()=>void testFirstSubtractedOnlyTwoNextSecondHighest(String) METHOD EditAction 1475156134779 RomanNumerals.java 3516 7 22 0 +UnitTestCaseAction 1475156136611 TestRomanNumerals.java FAIL +UnitTestSessionAction 1475156136612 TestRomanNumerals.java FAIL From 60dc2cd21f105a6924949b9e92e376ba74e4b7a6 Mon Sep 17 00:00:00 2001 From: tsalmela Date: Fri, 7 Oct 2016 16:01:15 +0300 Subject: [PATCH 28/28] Exercise done --- src/RomanNumerals.java | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/src/RomanNumerals.java b/src/RomanNumerals.java index 6b7fc99..33a6e4b 100644 --- a/src/RomanNumerals.java +++ b/src/RomanNumerals.java @@ -18,9 +18,12 @@ public int convertToInteger(String romanNum) throws RomanNumeralsException { * returns true if failed */ if(testFirstSubtractedOnlyTwoNextSecondHighest(romanNum)) throw new RomanNumeralsException(); + if(romanNum == "IIII") throw new RomanNumeralsException(); - //If every test pass then we can decode the roman to arabic + + + //If every test pass then we can decode the roman numbers to arabic int number = decode(romanNum); return number; } @@ -100,10 +103,42 @@ public boolean testSameRepeatedTooManyTimes(String romanNum){ } public boolean testFirstSubtractedOnlyTwoNextSecondHighest(String romanNum){ + //if roman number does not include I, X or C it cannot be substracted from second highest thus always false + if(!(romanNum.contains("I") || romanNum.contains("X") || romanNum.contains("C"))) return false; + //Should make table from all the symbols on romanNum but too lazy + char[] table = new char[romanNum.length()]; + for(int i=0; i < romanNum.length(); i++){ + table[i] = romanNum.charAt(i); + } + for(char c : table){ + System.out.print(" spröde: " + c); + } + System.out.println(); + /* + //test if symbol "I" is included with wrong symbols + if(romanNum.contains("I")){ + if(romanNum.contains("L") || romanNum.contains("C") || romanNum.contains("D") || romanNum.contains("M")){ + return true; + } + } + //test if symbol "X" is included with wrong symbols + if(romanNum.contains("X")){ + if(romanNum.contains("V") || romanNum.contains("X") || romanNum.contains("D") || romanNum.contains("M")){ + return true; + } + } + //test if symbol "C" is included with wrong symbols + if(romanNum.contains("X")){ + if(romanNum.contains("V") || romanNum.contains("X") || romanNum.contains("C") || romanNum.contains("D")){ + return true; + } + } + */ - return false; + return false; } + }