Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latest changes #23

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
07ca309
besouro automatic message
Oct 5, 2016
823b7de
besouro automatic message
Oct 5, 2016
83a225e
besouro automatic message
Oct 5, 2016
1cd2d6b
besouro automatic message
Oct 5, 2016
b201d57
besouro automatic message
Oct 5, 2016
05d61b2
besouro automatic message
Oct 5, 2016
5bfa682
besouro automatic message
Oct 5, 2016
c1e2a72
besouro automatic message
Oct 5, 2016
468f94e
besouro automatic message
Oct 5, 2016
cb79d32
besouro automatic message
Oct 5, 2016
79238b6
besouro automatic message
Oct 5, 2016
406ae91
besouro automatic message
Oct 5, 2016
56881e3
besouro automatic message
Oct 5, 2016
d2db261
besouro automatic message
Oct 5, 2016
e7a9db2
besouro automatic message
Oct 5, 2016
b041205
besouro automatic message
Oct 5, 2016
2b88780
besouro automatic message
Oct 5, 2016
be9ae99
besouro automatic message
Oct 5, 2016
2cad07b
besouro automatic message
Oct 5, 2016
709725a
besouro automatic message
Oct 5, 2016
687bd77
besouro automatic message
Oct 5, 2016
87c82a7
besouro automatic message
Oct 5, 2016
7c66de4
besouro automatic message
Oct 5, 2016
5d7b4a6
besouro automatic message
Oct 5, 2016
a8c631a
besouro automatic message
Oct 5, 2016
eaa82cd
besouro automatic message
Oct 5, 2016
d765447
besouro automatic message
Oct 5, 2016
82e44e6
besouro automatic message
Oct 5, 2016
a8b6b3a
besouro automatic message
Oct 5, 2016
03a68d3
besouro automatic message
Oct 5, 2016
4398a07
besouro automatic message
Oct 5, 2016
3a1cb84
besouro automatic message
Oct 5, 2016
2ec56a0
besouro automatic message
Oct 5, 2016
68f9e91
Latest changes
Oct 5, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions .besouro/20161005142751555/actions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
FileOpenedAction 1475666871807 TestRomanNumerals.java 159 1 1 0
RefactoringAction 1475667505999 TestRomanNumerals.java RENAME test()=>void atMosttest() METHOD
RefactoringAction 1475667509521 TestRomanNumerals.java RENAME atMosttest()=>void atMost3test() METHOD
RefactoringAction 1475667513038 TestRomanNumerals.java RENAME atMost3test()=>void atMost3chartest() METHOD
RefactoringAction 1475667515554 TestRomanNumerals.java RENAME atMost3chartest()=>void atMost3charest() METHOD
RefactoringAction 1475667516571 TestRomanNumerals.java RENAME atMost3charest()=>void atMost3charTest() METHOD
RefactoringAction 1475667519592 TestRomanNumerals.java RENAME atMost3charTest()=>void atMost3CharTest() METHOD
RefactoringAction 1475667594318 TestRomanNumerals.java MOVE <anonymous /1>=>class TestRomanNumerals METHOD
RefactoringAction 1475667623953 TestRomanNumerals.java REMOVE atMost3Char() METHOD
RefactoringAction 1475667626480 TestRomanNumerals.java ADD void atMost3Char() METHOD
RefactoringAction 1475667627506 TestRomanNumerals.java REMOVE atMost3Char() METHOD
EditAction 1475667829820 TestRomanNumerals.java 271 1 3 0
CompilationAction 1475667831177 TestRomanNumerals.java
CompilationAction 1475667831179 TestRomanNumerals.java
RefactoringAction 1475667870445 RomanNumerals.java ADD Boolean atMost3CharCheck(String) METHOD
RefactoringAction 1475667912544 RomanNumerals.java ADD RomanNumerals(String) METHOD
RefactoringAction 1475667939184 RomanNumerals.java ADD string nu FIELD
RefactoringAction 1475667940202 RomanNumerals.java RENAME nu=>string num FIELD
RefactoringAction 1475667944218 RomanNumerals.java REMOVE num FIELD
RefactoringAction 1475667979592 RomanNumerals.java ADD String number FIELD
RefactoringAction 1475668161192 RomanNumerals.java RENAME atMost3CharCheck(String)=>Boolean atMost3CharCheck() METHOD
RefactoringAction 1475668166221 RomanNumerals.java RENAME atMost3CharCheck()=>Boolean atMost3CharCheck(char) METHOD
RefactoringAction 1475668169247 RomanNumerals.java RENAME atMost3CharCheck(char)=>Boolean atMost3CharCheck(har) METHOD
RefactoringAction 1475668170763 RomanNumerals.java RENAME atMost3CharCheck(har)=>Boolean atMost3CharCheck(Char) METHOD
RefactoringAction 1475668177278 RomanNumerals.java RENAME atMost3CharCheck(Char)=>Boolean atMost3CharCheck(char) METHOD
EditAction 1475668511159 RomanNumerals.java 452 3 6 0
CompilationAction 1475668512328 TestRomanNumerals.java
CompilationAction 1475668679934 TestRomanNumerals.java
UnitTestCaseAction 1475668680414 TestRomanNumerals.java OK
UnitTestSessionAction 1475668680416 TestRomanNumerals.java OK
UnitTestCaseAction 1475668687254 TestRomanNumerals.java OK
UnitTestSessionAction 1475668687256 TestRomanNumerals.java OK
EditAction 1475668707630 TestRomanNumerals.java 289 1 4 1
UnitTestCaseAction 1475668708979 TestRomanNumerals.java FAIL
UnitTestSessionAction 1475668708980 TestRomanNumerals.java FAIL
EditAction 1475668724669 TestRomanNumerals.java 290 1 4 1
UnitTestCaseAction 1475668726103 TestRomanNumerals.java OK
UnitTestSessionAction 1475668726104 TestRomanNumerals.java OK
EditAction 1475668730903 TestRomanNumerals.java 289 1 4 1
UnitTestCaseAction 1475668732291 TestRomanNumerals.java FAIL
UnitTestSessionAction 1475668732292 TestRomanNumerals.java FAIL
EditAction 1475668743639 TestRomanNumerals.java 289 1 4 1
UnitTestCaseAction 1475668745063 TestRomanNumerals.java FAIL
UnitTestSessionAction 1475668745065 TestRomanNumerals.java FAIL
EditAction 1475668750499 TestRomanNumerals.java 290 1 4 1
UnitTestCaseAction 1475668751843 TestRomanNumerals.java FAIL
UnitTestSessionAction 1475668751845 TestRomanNumerals.java FAIL
EditAction 1475668770872 TestRomanNumerals.java 290 1 4 1
UnitTestCaseAction 1475668772322 TestRomanNumerals.java OK
UnitTestSessionAction 1475668772323 TestRomanNumerals.java OK
EditAction 1475668779831 TestRomanNumerals.java 289 1 4 1
UnitTestCaseAction 1475668781059 TestRomanNumerals.java FAIL
UnitTestSessionAction 1475668781060 TestRomanNumerals.java FAIL
EditAction 1475668828188 TestRomanNumerals.java 286 1 4 1
CompilationAction 1475668829492 TestRomanNumerals.java
RefactoringAction 1475668846250 RomanNumerals.java RENAME atMost3CharCheck(char)=>Boolean atMost3CharCheck() METHOD
EditAction 1475669218683 RomanNumerals.java 712 3 9 0
CompilationAction 1475669219875 RomanNumerals.java
CompilationAction 1475669238550 RomanNumerals.java
CompilationAction 1475669238728 RomanNumerals.java
EditAction 1475669244527 RomanNumerals.java 713 3 9 0
EditAction 1475669276652 TestRomanNumerals.java 285 1 4 1
UnitTestCaseAction 1475669278282 TestRomanNumerals.java OK
UnitTestSessionAction 1475669278283 TestRomanNumerals.java OK
EditAction 1475669290798 TestRomanNumerals.java 286 1 4 1
UnitTestCaseAction 1475669292319 TestRomanNumerals.java FAIL
UnitTestSessionAction 1475669292320 TestRomanNumerals.java FAIL
EditAction 1475669302783 TestRomanNumerals.java 288 1 4 1
UnitTestCaseAction 1475669304221 TestRomanNumerals.java OK
UnitTestSessionAction 1475669304222 TestRomanNumerals.java OK
EditAction 1475669308613 TestRomanNumerals.java 289 1 4 1
UnitTestCaseAction 1475669310492 TestRomanNumerals.java FAIL
UnitTestSessionAction 1475669310493 TestRomanNumerals.java FAIL
EditAction 1475669327190 TestRomanNumerals.java 287 1 4 1
UnitTestCaseAction 1475669328713 TestRomanNumerals.java OK
UnitTestSessionAction 1475669328714 TestRomanNumerals.java OK
EditAction 1475669336905 TestRomanNumerals.java 288 1 4 1
UnitTestCaseAction 1475669338353 TestRomanNumerals.java FAIL
UnitTestSessionAction 1475669338354 TestRomanNumerals.java FAIL
EditAction 1475669368389 TestRomanNumerals.java 289 1 4 1
UnitTestCaseAction 1475669369764 TestRomanNumerals.java OK
UnitTestSessionAction 1475669369765 TestRomanNumerals.java OK
EditAction 1475669375003 TestRomanNumerals.java 290 1 4 1
UnitTestCaseAction 1475669376470 TestRomanNumerals.java FAIL
UnitTestSessionAction 1475669376471 TestRomanNumerals.java FAIL
EditAction 1475669385325 TestRomanNumerals.java 292 1 4 1
UnitTestCaseAction 1475669386517 TestRomanNumerals.java OK
UnitTestSessionAction 1475669386518 TestRomanNumerals.java OK
EditAction 1475669403039 TestRomanNumerals.java 289 1 4 1
RefactoringAction 1475669492971 TestRomanNumerals.java ADD void atMost3CharTest()/2 METHOD
RefactoringAction 1475669502986 TestRomanNumerals.java RENAME atMost3CharTest()/2=>void CharTest() METHOD
RefactoringAction 1475669508500 TestRomanNumerals.java RENAME CharTest()=>void repeatCharTest() METHOD
RefactoringAction 1475669619057 RomanNumerals.java ADD Boolean repetitionCharCheck() METHOD
EditAction 1475669727087 RomanNumerals.java 1125 4 15 0
EditAction 1475669731328 TestRomanNumerals.java 479 2 8 2
RefactoringAction 1475669765666 TestRomanNumerals.java RENAME repeatCharTest()=>void repetitionCharTest() METHOD
EditAction 1475669777345 TestRomanNumerals.java 483 2 8 2
UnitTestCaseAction 1475669778715 TestRomanNumerals.java OK
UnitTestSessionAction 1475669778716 TestRomanNumerals.java OK
EditAction 1475669784990 TestRomanNumerals.java 484 2 8 2
UnitTestCaseAction 1475669786318 TestRomanNumerals.java FAIL
UnitTestSessionAction 1475669786319 TestRomanNumerals.java FAIL
EditAction 1475669792643 TestRomanNumerals.java 484 2 8 2
UnitTestCaseAction 1475669794098 TestRomanNumerals.java OK
UnitTestSessionAction 1475669794099 TestRomanNumerals.java OK
EditAction 1475669800345 TestRomanNumerals.java 485 2 8 2
UnitTestCaseAction 1475669801824 TestRomanNumerals.java FAIL
UnitTestSessionAction 1475669801825 TestRomanNumerals.java FAIL
EditAction 1475669808200 TestRomanNumerals.java 485 2 8 2
UnitTestCaseAction 1475669809666 TestRomanNumerals.java OK
UnitTestSessionAction 1475669809668 TestRomanNumerals.java OK
EditAction 1475669814300 TestRomanNumerals.java 486 2 8 2
UnitTestCaseAction 1475669815582 TestRomanNumerals.java FAIL
UnitTestSessionAction 1475669815583 TestRomanNumerals.java FAIL
EditAction 1475669820590 TestRomanNumerals.java 485 2 8 2
EditAction 1475669843539 TestRomanNumerals.java 497 2 8 2
UnitTestCaseAction 1475669993461 TestRomanNumerals.java OK
UnitTestSessionAction 1475669993462 TestRomanNumerals.java OK
16 changes: 16 additions & 0 deletions .besouro/20161005142751555/besouroEpisodes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
1475668680416 test-addition 1 1808 true
1475668687256 regression 1 0 true
1475668726104 test-addition 2 18 true
1475668726105 test-addition 1 18 true
1475668772323 regression 2 41 true
1475669278283 refactoring 2A 498 true
1475669278284 production 1 498 false
1475669304222 regression 2 13 true
1475669328714 regression 2 20 true
1475669369765 regression 2 32 true
1475669386518 regression 2 11 true
1475669778716 test-first 4 375 true
1475669778717 test-last 1 375 false
1475669794099 regression 2 9 true
1475669809668 regression 2 9 true
1475669993462 regression 2 179 true
Empty file.
13 changes: 13 additions & 0 deletions .besouro/20161005142751555/randomHeuristicEpisodes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
1475668680416 test-addition 1 1808 false
1475668687256 regression 1 0 true
1475668726104 test-addition 2 18 true
1475668772323 regression 2 41 true
1475669278283 refactoring 2A 498 true
1475669304222 regression 2 13 true
1475669328714 regression 2 20 false
1475669369765 regression 2 32 false
1475669386518 regression 2 11 false
1475669778716 test-first 4 375 true
1475669794099 regression 2 9 true
1475669809668 regression 2 9 false
1475669993462 regression 2 179 true
Empty file.
13 changes: 13 additions & 0 deletions .besouro/20161005142751555/zorroEpisodes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
1475668680416 test-addition 1 1808 true
1475668687256 regression 1 6 true
1475668726104 test-addition 2 38 true
1475668772323 regression 2 46 true
1475669278283 refactoring 2A 505 true
1475669304222 regression 2 25 true
1475669328714 regression 2 24 true
1475669369765 regression 2 41 true
1475669386518 regression 2 16 true
1475669778716 test-first 4 392 true
1475669794099 regression 2 15 true
1475669809668 regression 2 15 true
1475669993462 regression 2 183 true
65 changes: 65 additions & 0 deletions src/RomanNumerals.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,73 @@

public class RomanNumerals {

private String number;

public RomanNumerals(String string) {
number = string;
}

public int convertToInteger(String romanNum) {
// To be Implemented
return 0;

}

public Boolean atMost3CharCheck() {
int counter1 = 0;
int counter2 = 0;
int counter3 = 0;
int counter4 = 0;

for(int i = 0; i<number.length(); ++i) {

if('I' == number.charAt(i)) {
++counter1;
}
if('X' == number.charAt(i)) {
++counter2;
}
if('C' == number.charAt(i)) {
++counter3;
}
if('M' == number.charAt(i)) {
++counter4;
}

}

if(counter1>3 || counter2>3 || counter3>3 || counter4>3) {
return false;
}

return true;

}

public Boolean repetitionCharCheck() {
int counter1 = 0;
int counter2 = 0;
int counter3 = 0;

for(int i = 0; i<number.length(); ++i) {

if('V' == number.charAt(i)) {
++counter1;
}
if('L' == number.charAt(i)) {
++counter2;
}
if('D' == number.charAt(i)) {
++counter3;
}

}

if(counter1>1 || counter2>1 || counter3>1 ) {
return false;
}

return true;
}

}
26 changes: 22 additions & 4 deletions tests/TestRomanNumerals.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,26 @@
public class TestRomanNumerals {

@Test
public void test() {
fail("Not yet implemented");
public void atMost3CharTest() {

RomanNumerals rm = new RomanNumerals("XXXMMMIIIV");
Boolean valid = false;
valid = rm.atMost3CharCheck();

assertEquals(true, valid);

}

}

@Test
public void repetitionCharTest() {

RomanNumerals rm = new RomanNumerals("XXXLMMMDIIIV");
Boolean valid = false;
valid = rm.repetitionCharCheck();

assertEquals(true, valid);

}


}