From 7cb41cdcc54024fed23cf34fc6143b256c1af94b Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 12:20:30 +0300 Subject: [PATCH 01/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 11 +++++++++++ .besouro/20151009120031690/besouroEpisodes.txt | 0 .besouro/20151009120031690/disagreements.txt | 0 .../20151009120031690/randomHeuristicEpisodes.txt | 0 .besouro/20151009120031690/userComments.txt | 0 .besouro/20151009120031690/zorroEpisodes.txt | 0 .../unioulu/tol/sqatlab/gameoflife/test/TestCell.java | 11 +++++++++-- 7 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 .besouro/20151009120031690/actions.txt create mode 100644 .besouro/20151009120031690/besouroEpisodes.txt create mode 100644 .besouro/20151009120031690/disagreements.txt create mode 100644 .besouro/20151009120031690/randomHeuristicEpisodes.txt create mode 100644 .besouro/20151009120031690/userComments.txt create mode 100644 .besouro/20151009120031690/zorroEpisodes.txt diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt new file mode 100644 index 0000000..596691e --- /dev/null +++ b/.besouro/20151009120031690/actions.txt @@ -0,0 +1,11 @@ +FileOpenedAction 1444381232002 Cell.java 68 0 0 0 +FileOpenedAction 1444382120229 TestCell.java 200 1 1 0 +RefactoringAction 1444382177874 TestCell.java RENAME test()=>void testLiveCell() METHOD +RefactoringAction 1444382182508 TestCell.java RENAME testLiveCell()=>void testLiveCellWithN() METHOD +RefactoringAction 1444382185612 TestCell.java RENAME testLiveCellWithN()=>void testLiveCellWithNoNeighbors() METHOD +RefactoringAction 1444382188186 TestCell.java RENAME testLiveCellWithNoNeighbors()=>void testLiveCellWithNoNeighborsShouldDie() METHOD +RefactoringAction 1444382387293 TestCell.java ADD import org.unioulu.tol.sqatlab.gameoflife.Cell IMPORT +RefactoringAction 1444382395358 Cell.java ADD Cell(String) METHOD +RefactoringAction 1444382406886 Cell.java ADD void nextIteration() METHOD +RefactoringAction 1444382414703 Cell.java ADD Object getState() METHOD +EditAction 1444382429509 TestCell.java 380 1 3 1 diff --git a/.besouro/20151009120031690/besouroEpisodes.txt b/.besouro/20151009120031690/besouroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20151009120031690/disagreements.txt b/.besouro/20151009120031690/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20151009120031690/randomHeuristicEpisodes.txt b/.besouro/20151009120031690/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20151009120031690/userComments.txt b/.besouro/20151009120031690/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20151009120031690/zorroEpisodes.txt b/.besouro/20151009120031690/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java index d8de09e..e8163b3 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java @@ -3,12 +3,19 @@ import static org.junit.Assert.*; import org.junit.Test; +import org.unioulu.tol.sqatlab.gameoflife.Cell; public class TestCell { @Test - public void test() { - fail("Not yet implemented"); + public void testLiveCellWithNoNeighborsShouldDie() { + //arrange + Cell cell = new Cell("Alive"); + // + cell.nextIteration(); + // + //assert + assertEquals("Dead", cell.getState()); } } From 4a4ec5aa24a0e0f95211bf09f2a7586276c1c843 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 12:20:34 +0300 Subject: [PATCH 02/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 4 ++++ src/org/unioulu/tol/sqatlab/gameoflife/Cell.java | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 596691e..1986c93 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -9,3 +9,7 @@ RefactoringAction 1444382395358 Cell.java ADD Cell(String) METHOD RefactoringAction 1444382406886 Cell.java ADD void nextIteration() METHOD RefactoringAction 1444382414703 Cell.java ADD Object getState() METHOD EditAction 1444382429509 TestCell.java 380 1 3 1 +CompilationAction 1444382433066 TestCell.java +CompilationAction 1444382433066 TestCell.java +CompilationAction 1444382433066 TestCell.java +EditAction 1444382433160 Cell.java 303 3 1 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java index b66e9c8..e7fbdaf 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java @@ -2,4 +2,18 @@ public class Cell { + public Cell(String string) { + // TODO Auto-generated constructor stub + } + + public void nextIteration() { + // TODO Auto-generated method stub + + } + + public Object getState() { + // TODO Auto-generated method stub + return null; + } + } From 1a40f817defb8be03b735d8445c3866360b71151 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 12:21:02 +0300 Subject: [PATCH 03/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 3 +++ src/org/unioulu/tol/sqatlab/gameoflife/Cell.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 1986c93..4cc3be5 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -13,3 +13,6 @@ CompilationAction 1444382433066 TestCell.java CompilationAction 1444382433066 TestCell.java CompilationAction 1444382433066 TestCell.java EditAction 1444382433160 Cell.java 303 3 1 0 +UnitTestCaseAction 1444382436997 TestCell.java FAIL +UnitTestSessionAction 1444382436997 TestCell FAIL +EditAction 1444382461583 Cell.java 305 3 1 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java index e7fbdaf..0eb6300 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java @@ -13,7 +13,7 @@ public void nextIteration() { public Object getState() { // TODO Auto-generated method stub - return null; + return "Dead"; } } From 1eee849e0cb3f915c518d79c42110ca990dc1762 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 12:22:32 +0300 Subject: [PATCH 04/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 9 +++++++++ .../unioulu/tol/sqatlab/gameoflife/test/TestCell.java | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 4cc3be5..e617ddf 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -16,3 +16,12 @@ EditAction 1444382433160 Cell.java 303 3 1 0 UnitTestCaseAction 1444382436997 TestCell.java FAIL UnitTestSessionAction 1444382436997 TestCell FAIL EditAction 1444382461583 Cell.java 305 3 1 0 +RefactoringAction 1444382489151 TestCell.java ADD void testLiveCellWithNoNeighborsShouldDie()/2 METHOD +RefactoringAction 1444382496904 TestCell.java RENAME testLiveCellWithNoNeighborsShouldDie()/2=> null +RefactoringAction 1444382509774 TestCell.java RENAME =>void testLiveCellWith() METHOD +RefactoringAction 1444382511849 TestCell.java RENAME testLiveCellWith()=>void testLiveCellWithNeighbors() METHOD +RefactoringAction 1444382513923 TestCell.java RENAME testLiveCellWithNeighbors()=>void testLiveCellWithNeighborsShouldDie() METHOD +RefactoringAction 1444382539868 TestCell.java RENAME testLiveCellWithNeighborsShouldDie()=>void testLiveCellWithTwoNeighborsShouldDie() METHOD +RefactoringAction 1444382545032 TestCell.java RENAME testLiveCellWithTwoNeighborsShouldDie()=>void testLiveCellWithTwoNeighborsShould() METHOD +RefactoringAction 1444382546592 TestCell.java RENAME testLiveCellWithTwoNeighborsShould()=>void testLiveCellWithTwoNeighborsShouldLive() METHOD +EditAction 1444382551726 TestCell.java 580 2 6 2 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java index e8163b3..6e43d21 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java @@ -17,5 +17,16 @@ public void testLiveCellWithNoNeighborsShouldDie() { //assert assertEquals("Dead", cell.getState()); } + + @Test + public void testLiveCellWithTwoNeighborsShouldLive() { + //arrange + Cell cell = new Cell("Alive"); + // + cell.nextIteration(); + // + //assert + assertEquals("Alive", cell.getState()); + } } From 66c130d1b32067b49846ac68e34eb7b6d4a14d1f Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 12:25:09 +0300 Subject: [PATCH 05/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 6 ++++++ .besouro/20151009120031690/besouroEpisodes.txt | 10 ++++++++++ .besouro/20151009120031690/randomHeuristicEpisodes.txt | 1 + .besouro/20151009120031690/zorroEpisodes.txt | 1 + src/org/unioulu/tol/sqatlab/gameoflife/Cell.java | 10 ++++++---- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index e617ddf..806bff9 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -25,3 +25,9 @@ RefactoringAction 1444382539868 TestCell.java RENAME testLiveCellWithNeighborsSh RefactoringAction 1444382545032 TestCell.java RENAME testLiveCellWithTwoNeighborsShouldDie()=>void testLiveCellWithTwoNeighborsShould() METHOD RefactoringAction 1444382546592 TestCell.java RENAME testLiveCellWithTwoNeighborsShould()=>void testLiveCellWithTwoNeighborsShouldLive() METHOD EditAction 1444382551726 TestCell.java 580 2 6 2 +UnitTestCaseAction 1444382555314 TestCell.java FAIL +UnitTestSessionAction 1444382555314 TestCell.testLiveCellWithTwoNeighborsShouldLive FAIL +RefactoringAction 1444382631160 Cell.java ADD String state FIELD +UnitTestCaseAction 1444382674262 TestCell.java OK +UnitTestSessionAction 1444382674263 TestCell.testLiveCellWithTwoNeighborsShouldLive OK +EditAction 1444382708197 Cell.java 285 3 2 0 diff --git a/.besouro/20151009120031690/besouroEpisodes.txt b/.besouro/20151009120031690/besouroEpisodes.txt index e69de29..0ee5c19 100644 --- a/.besouro/20151009120031690/besouroEpisodes.txt +++ b/.besouro/20151009120031690/besouroEpisodes.txt @@ -0,0 +1,10 @@ +1444382674263 test-first 1 1442 true +1444382674264 test-first 1 1442 true +1444382674265 test-first 1 1442 true +1444382674266 test-first 1 1442 true +1444382674267 test-first 1 1442 true +1444382674268 test-last 1 1442 false +1444382674269 test-last 1 1442 false +1444382674270 test-last 1 1442 false +1444382674271 test-last 1 1442 false +1444382674272 test-first 1 1442 true diff --git a/.besouro/20151009120031690/randomHeuristicEpisodes.txt b/.besouro/20151009120031690/randomHeuristicEpisodes.txt index e69de29..f1c73d9 100644 --- a/.besouro/20151009120031690/randomHeuristicEpisodes.txt +++ b/.besouro/20151009120031690/randomHeuristicEpisodes.txt @@ -0,0 +1 @@ +1444382674263 test-first 1 1442 true diff --git a/.besouro/20151009120031690/zorroEpisodes.txt b/.besouro/20151009120031690/zorroEpisodes.txt index e69de29..f1c73d9 100644 --- a/.besouro/20151009120031690/zorroEpisodes.txt +++ b/.besouro/20151009120031690/zorroEpisodes.txt @@ -0,0 +1 @@ +1444382674263 test-first 1 1442 true diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java index 0eb6300..e02b232 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java @@ -2,18 +2,20 @@ public class Cell { - public Cell(String string) { - // TODO Auto-generated constructor stub + String state; + + public Cell(String initialState) { + this.state = initialState; } public void nextIteration() { - // TODO Auto-generated method stub } public Object getState() { // TODO Auto-generated method stub - return "Dead"; + + return this.state; } } From 0ffbacc4cfe388534b9e5767b8a5b7b7c11ea77f Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 12:25:16 +0300 Subject: [PATCH 06/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 1 + src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 806bff9..fcbfc57 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -31,3 +31,4 @@ RefactoringAction 1444382631160 Cell.java ADD String state FIELD UnitTestCaseAction 1444382674262 TestCell.java OK UnitTestSessionAction 1444382674263 TestCell.testLiveCellWithTwoNeighborsShouldLive OK EditAction 1444382708197 Cell.java 285 3 2 0 +EditAction 1444382714954 TestCell.java 570 2 6 2 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java index 6e43d21..13a113e 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java @@ -13,7 +13,6 @@ public void testLiveCellWithNoNeighborsShouldDie() { Cell cell = new Cell("Alive"); // cell.nextIteration(); - // //assert assertEquals("Dead", cell.getState()); } @@ -24,7 +23,6 @@ public void testLiveCellWithTwoNeighborsShouldLive() { Cell cell = new Cell("Alive"); // cell.nextIteration(); - // //assert assertEquals("Alive", cell.getState()); } From cc765ddf989e3ce9e9bcc6cf19e3d9c9ffa4de90 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 12:29:28 +0300 Subject: [PATCH 07/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 7 +++++++ src/org/unioulu/tol/sqatlab/gameoflife/Cell.java | 7 +++++-- src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index fcbfc57..ffa7342 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -32,3 +32,10 @@ UnitTestCaseAction 1444382674262 TestCell.java OK UnitTestSessionAction 1444382674263 TestCell.testLiveCellWithTwoNeighborsShouldLive OK EditAction 1444382708197 Cell.java 285 3 2 0 EditAction 1444382714954 TestCell.java 570 2 6 2 +UnitTestCaseAction 1444382718230 TestCell.java FAIL +UnitTestSessionAction 1444382718230 TestCell FAIL +RefactoringAction 1444382842710 Cell.java RENAME nextIteration()=>void nextIteration(int) METHOD +RefactoringAction 1444382846875 Cell.java RENAME nextIteration(int)=>void nextIteration FIELD +RefactoringAction 1444382865408 Cell.java RENAME nextIteration()=>void nextIteration(int) METHOD +CompilationAction 1444382954287 TestCell.java +EditAction 1444382967594 TestCell.java 572 2 6 2 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java index e02b232..8640124 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java @@ -8,8 +8,11 @@ public Cell(String initialState) { this.state = initialState; } - public void nextIteration() { - + public void nextIteration(int numOfLiveCells) { + if(state == "Alive" && numOfLiveCells < 2){ + state = "Dead"; + }else + state = "Alive"; } public Object getState() { diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java index 13a113e..5a7166d 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java @@ -12,7 +12,7 @@ public void testLiveCellWithNoNeighborsShouldDie() { //arrange Cell cell = new Cell("Alive"); // - cell.nextIteration(); + cell.nextIteration(0); //assert assertEquals("Dead", cell.getState()); } @@ -22,7 +22,7 @@ public void testLiveCellWithTwoNeighborsShouldLive() { //arrange Cell cell = new Cell("Alive"); // - cell.nextIteration(); + cell.nextIteration(2); //assert assertEquals("Alive", cell.getState()); } From 00768b6e341e7ca6da73b5187c70894b79fa9aa1 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 12:38:16 +0300 Subject: [PATCH 08/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 16 ++++++++++++++++ .besouro/20151009120031690/besouroEpisodes.txt | 1 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20151009120031690/zorroEpisodes.txt | 1 + src/org/unioulu/tol/sqatlab/gameoflife/Cell.java | 7 +++++++ src/org/unioulu/tol/sqatlab/gameoflife/Grid.java | 5 +++++ 6 files changed, 31 insertions(+) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index ffa7342..c24ba82 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -39,3 +39,19 @@ RefactoringAction 1444382846875 Cell.java RENAME nextIteration(int)=>void nextIt RefactoringAction 1444382865408 Cell.java RENAME nextIteration()=>void nextIteration(int) METHOD CompilationAction 1444382954287 TestCell.java EditAction 1444382967594 TestCell.java 572 2 6 2 +UnitTestCaseAction 1444382980138 TestCell.java OK +UnitTestSessionAction 1444382980138 TestCell OK +FileOpenedAction 1444383091965 TestGrid.java 199 1 1 0 +RefactoringAction 1444383105851 TestGrid.java RENAME test()=> null +RefactoringAction 1444383110484 TestGrid.java RENAME =>void singleCell() METHOD +RefactoringAction 1444383117177 TestGrid.java RENAME singleCell()=>void singleCellGrid() METHOD +RefactoringAction 1444383120266 TestGrid.java RENAME singleCellGrid()=>void singleCell() METHOD +RefactoringAction 1444383126958 TestGrid.java RENAME singleCell()=>void test() METHOD +RefactoringAction 1444383380910 TestGrid.java ADD import org.unioulu.tol.sqatlab.gameoflife.Grid IMPORT +RefactoringAction 1444383415076 TestGrid.java ADD import org.unioulu.tol.sqatlab.gameoflife.Cell IMPORT +RefactoringAction 1444383422050 Cell.java ADD Cell(int, int) METHOD +RefactoringAction 1444383447401 Cell.java ADD int x FIELD +RefactoringAction 1444383447401 Cell.java ADD int y FIELD +FileOpenedAction 1444383480865 Grid.java 68 0 0 0 +RefactoringAction 1444383480943 Grid.java ADD int getNeighbors(Cell) METHOD +EditAction 1444383495747 Grid.java 159 1 1 0 diff --git a/.besouro/20151009120031690/besouroEpisodes.txt b/.besouro/20151009120031690/besouroEpisodes.txt index 0ee5c19..567cb2c 100644 --- a/.besouro/20151009120031690/besouroEpisodes.txt +++ b/.besouro/20151009120031690/besouroEpisodes.txt @@ -8,3 +8,4 @@ 1444382674270 test-last 1 1442 false 1444382674271 test-last 1 1442 false 1444382674272 test-first 1 1442 true +1444382980138 production 1 271 false diff --git a/.besouro/20151009120031690/randomHeuristicEpisodes.txt b/.besouro/20151009120031690/randomHeuristicEpisodes.txt index f1c73d9..0477e20 100644 --- a/.besouro/20151009120031690/randomHeuristicEpisodes.txt +++ b/.besouro/20151009120031690/randomHeuristicEpisodes.txt @@ -1 +1,2 @@ 1444382674263 test-first 1 1442 true +1444382980138 production 1 271 false diff --git a/.besouro/20151009120031690/zorroEpisodes.txt b/.besouro/20151009120031690/zorroEpisodes.txt index f1c73d9..a3d40c3 100644 --- a/.besouro/20151009120031690/zorroEpisodes.txt +++ b/.besouro/20151009120031690/zorroEpisodes.txt @@ -1 +1,2 @@ 1444382674263 test-first 1 1442 true +1444382980138 production 1 305 true diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java index 8640124..98b4c60 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java @@ -3,11 +3,18 @@ public class Cell { String state; + int x; + int y; public Cell(String initialState) { this.state = initialState; } + public Cell(int i, int j) { + this.x = i; + this.y = j; + } + public void nextIteration(int numOfLiveCells) { if(state == "Alive" && numOfLiveCells < 2){ state = "Dead"; diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index 19dbf0b..d7cc274 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -2,4 +2,9 @@ public class Grid { + public int getNeighbors(Cell cell) { + // TODO Auto-generated method stub + return 0; + } + } From d5a97dd2fd2441684845ab8e0dc42ea154de436c Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 12:38:19 +0300 Subject: [PATCH 09/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 1 + .../unioulu/tol/sqatlab/gameoflife/test/TestGrid.java | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index c24ba82..d8443f1 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -55,3 +55,4 @@ RefactoringAction 1444383447401 Cell.java ADD int y FIELD FileOpenedAction 1444383480865 Grid.java 68 0 0 0 RefactoringAction 1444383480943 Grid.java ADD int getNeighbors(Cell) METHOD EditAction 1444383495747 Grid.java 159 1 1 0 +EditAction 1444383498711 TestGrid.java 403 1 4 1 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index 9614d55..5fd8a00 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -2,12 +2,19 @@ import static org.junit.Assert.*; import org.junit.Test; +import org.unioulu.tol.sqatlab.gameoflife.Cell; +import org.unioulu.tol.sqatlab.gameoflife.Grid; public class TestGrid { @Test public void test() { - fail("Not yet implemented"); + Grid grid = new Grid(); + Cell cell = new Cell(0,0); + + int numNeighbors = grid.getNeighbors(cell); + + assertEquals(0, numNeighbors); } } From 52f47d32c345abb143e6319c805a35323acf2ab5 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 12:41:43 +0300 Subject: [PATCH 10/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 7 +++++++ .../20151009120031690/besouroEpisodes.txt | 1 + .../randomHeuristicEpisodes.txt | 1 + .besouro/20151009120031690/zorroEpisodes.txt | 1 + .../tol/sqatlab/gameoflife/test/TestGrid.java | 21 ++++++++++++++++--- 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index d8443f1..76c7665 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -56,3 +56,10 @@ FileOpenedAction 1444383480865 Grid.java 68 0 0 0 RefactoringAction 1444383480943 Grid.java ADD int getNeighbors(Cell) METHOD EditAction 1444383495747 Grid.java 159 1 1 0 EditAction 1444383498711 TestGrid.java 403 1 4 1 +UnitTestCaseAction 1444383502114 TestGrid.java OK +UnitTestSessionAction 1444383502114 TestGrid OK +RefactoringAction 1444383534985 TestGrid.java RENAME test()=>void testSingleCellOnGrid() METHOD +RefactoringAction 1444383538074 TestGrid.java RENAME testSingleCellOnGrid()=>void testSingleCellOnGridHasNoNeighbors() METHOD +RefactoringAction 1444383613550 Grid.java ADD void addCell(Cell) METHOD +RefactoringAction 1444383637389 TestGrid.java ADD void testSingleCellOnGridHasNoNeighbors()/2 METHOD +EditAction 1444383702773 TestGrid.java 786 2 12 2 diff --git a/.besouro/20151009120031690/besouroEpisodes.txt b/.besouro/20151009120031690/besouroEpisodes.txt index 567cb2c..2aaf45e 100644 --- a/.besouro/20151009120031690/besouroEpisodes.txt +++ b/.besouro/20151009120031690/besouroEpisodes.txt @@ -9,3 +9,4 @@ 1444382674271 test-last 1 1442 false 1444382674272 test-first 1 1442 true 1444382980138 production 1 271 false +1444383502114 test-last 1 410 false diff --git a/.besouro/20151009120031690/randomHeuristicEpisodes.txt b/.besouro/20151009120031690/randomHeuristicEpisodes.txt index 0477e20..730b9d4 100644 --- a/.besouro/20151009120031690/randomHeuristicEpisodes.txt +++ b/.besouro/20151009120031690/randomHeuristicEpisodes.txt @@ -1,2 +1,3 @@ 1444382674263 test-first 1 1442 true 1444382980138 production 1 271 false +1444383502114 test-last 1 410 false diff --git a/.besouro/20151009120031690/zorroEpisodes.txt b/.besouro/20151009120031690/zorroEpisodes.txt index a3d40c3..f6f8d70 100644 --- a/.besouro/20151009120031690/zorroEpisodes.txt +++ b/.besouro/20151009120031690/zorroEpisodes.txt @@ -1,2 +1,3 @@ 1444382674263 test-first 1 1442 true 1444382980138 production 1 305 true +1444383502114 test-last 1 521 false diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index 5fd8a00..ebae9a6 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -8,13 +8,28 @@ public class TestGrid { @Test - public void test() { + public void testSingleCellOnGridHasNoNeighbors() { + //arrange Grid grid = new Grid(); Cell cell = new Cell(0,0); - + //act + grid.addCell(cell); int numNeighbors = grid.getNeighbors(cell); - + //assert assertEquals(0, numNeighbors); } + @Test + public void testSingleCellOnGridHasNoNeighbors() { + //arrange + Grid grid = new Grid(); + Cell cell1 = new Cell(0,0); + Cell cell2 = new Cell(0,1); + //act + grid.addCell(cell1); + grid.addCell(cell2); + int numNeighbors = grid.getNeighbors(cell1); + //assert + assertEquals(1, numNeighbors); + } } From 0d789a1efa1e8c90980b8c472b758dde81deb47b Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 12:42:19 +0300 Subject: [PATCH 11/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 5 +++++ src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 76c7665..bb9c67f 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -63,3 +63,8 @@ RefactoringAction 1444383538074 TestGrid.java RENAME testSingleCellOnGrid()=>voi RefactoringAction 1444383613550 Grid.java ADD void addCell(Cell) METHOD RefactoringAction 1444383637389 TestGrid.java ADD void testSingleCellOnGridHasNoNeighbors()/2 METHOD EditAction 1444383702773 TestGrid.java 786 2 12 2 +CompilationAction 1444383707765 TestGrid.java +CompilationAction 1444383707765 TestGrid.java +RefactoringAction 1444383712803 TestGrid.java RENAME testSingleCellOnGridHasNoNeighbors()/2=>void testSingleCellOnGridHasOneNeighbors() METHOD +RefactoringAction 1444383714363 TestGrid.java RENAME testSingleCellOnGridHasOneNeighbors()=>void testSingleCellOnGridHasOneNeighbor() METHOD +EditAction 1444383738187 TestGrid.java 786 2 12 2 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index ebae9a6..bbdc3b8 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -20,7 +20,7 @@ public void testSingleCellOnGridHasNoNeighbors() { } @Test - public void testSingleCellOnGridHasNoNeighbors() { + public void testSingleCellOnGridHasOneNeighbor() { //arrange Grid grid = new Grid(); Cell cell1 = new Cell(0,0); From 656e0062c8b591dfcd33fe061c6db658404dcbb3 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 12:46:23 +0300 Subject: [PATCH 12/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 4 ++++ src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index bb9c67f..a970895 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -68,3 +68,7 @@ CompilationAction 1444383707765 TestGrid.java RefactoringAction 1444383712803 TestGrid.java RENAME testSingleCellOnGridHasNoNeighbors()/2=>void testSingleCellOnGridHasOneNeighbors() METHOD RefactoringAction 1444383714363 TestGrid.java RENAME testSingleCellOnGridHasOneNeighbors()=>void testSingleCellOnGridHasOneNeighbor() METHOD EditAction 1444383738187 TestGrid.java 786 2 12 2 +CompilationAction 1444383741307 TestGrid.java +RefactoringAction 1444383749294 Grid.java ADD void addCell(Cell)/2 METHOD +RefactoringAction 1444383757562 Grid.java REMOVE addCell(Cell)/2 METHOD +EditAction 1444383982589 TestCell.java 576 2 6 2 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java index 5a7166d..daca61e 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java @@ -26,5 +26,7 @@ public void testLiveCellWithTwoNeighborsShouldLive() { //assert assertEquals("Alive", cell.getState()); } + + } From a59c588e60192a0deb189f442d93edd973e4f5b2 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 12:47:33 +0300 Subject: [PATCH 13/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 3 +++ src/org/unioulu/tol/sqatlab/gameoflife/Grid.java | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index a970895..55ad0a2 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -72,3 +72,6 @@ CompilationAction 1444383741307 TestGrid.java RefactoringAction 1444383749294 Grid.java ADD void addCell(Cell)/2 METHOD RefactoringAction 1444383757562 Grid.java REMOVE addCell(Cell)/2 METHOD EditAction 1444383982589 TestCell.java 576 2 6 2 +RefactoringAction 1444384044650 Grid.java ADD void addCell(Cell)/2 METHOD +RefactoringAction 1444384050078 Grid.java REMOVE addCell(Cell)/2 METHOD +EditAction 1444384052216 Grid.java 239 2 1 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index d7cc274..08e9c14 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -7,4 +7,11 @@ public int getNeighbors(Cell cell) { return 0; } + public void addCell(Cell cell) { + // TODO Auto-generated method stub + + } + + + } From 00596bd5c7c4562b2329adcd6d952dbefae1687c Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:12:50 +0300 Subject: [PATCH 14/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 15 +++++++++ .../unioulu/tol/sqatlab/gameoflife/Cell.java | 33 +++++++++++++++++++ .../unioulu/tol/sqatlab/gameoflife/Grid.java | 22 ++++++++++--- .../tol/sqatlab/gameoflife/test/TestGrid.java | 4 +-- 4 files changed, 68 insertions(+), 6 deletions(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 55ad0a2..9766fc2 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -75,3 +75,18 @@ EditAction 1444383982589 TestCell.java 576 2 6 2 RefactoringAction 1444384044650 Grid.java ADD void addCell(Cell)/2 METHOD RefactoringAction 1444384050078 Grid.java REMOVE addCell(Cell)/2 METHOD EditAction 1444384052216 Grid.java 239 2 1 0 +UnitTestCaseAction 1444384063588 TestGrid.java FAIL +UnitTestSessionAction 1444384063588 TestGrid FAIL +RefactoringAction 1444384256432 Grid.java ADD Array arrayOfCells FIELD +RefactoringAction 1444384318290 Grid.java REMOVE arrayOfCells FIELD +RefactoringAction 1444384601211 Grid.java ADD Set cells FIELD +RefactoringAction 1444384621148 Grid.java ADD import java.util.Set IMPORT +RefactoringAction 1444384625189 Grid.java ADD import java.util.HashSet IMPORT +RefactoringAction 1444384691446 Cell.java ADD int hashCode() METHOD +RefactoringAction 1444384691446 Cell.java ADD boolean equals(Object) METHOD +RefactoringAction 1444384979421 Cell.java ADD int getX FIELD +RefactoringAction 1444384981496 Cell.java RENAME getX=>int getX() METHOD +RefactoringAction 1444385015037 Cell.java ADD int getX()/2 METHOD +RefactoringAction 1444385017112 Cell.java RENAME getX()/2=>int getY() METHOD +RefactoringAction 1444385509365 Grid.java RENAME getNeighbors(Cell)=>int getNumNeighbors(Cell) METHOD +EditAction 1444385568913 TestGrid.java 792 2 12 2 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java index 98b4c60..1cfab82 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java @@ -14,6 +14,14 @@ public Cell(int i, int j) { this.x = i; this.y = j; } + + public int getX(){ + return x; + } + + public int getY(){ + return y; + } public void nextIteration(int numOfLiveCells) { if(state == "Alive" && numOfLiveCells < 2){ @@ -28,4 +36,29 @@ public Object getState() { return this.state; } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + x; + result = prime * result + y; + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Cell other = (Cell) obj; + if (x != other.x) + return false; + if (y != other.y) + return false; + return true; + } + } diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index 08e9c14..4cef97d 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -1,15 +1,29 @@ package org.unioulu.tol.sqatlab.gameoflife; -public class Grid { +import java.util.HashSet; +import java.util.Set; - public int getNeighbors(Cell cell) { - // TODO Auto-generated method stub +public class Grid { + + private Set cells = new HashSet<>(); + + public int getNumNeighbors(Cell cell) { + int numNeighbors = 0; + Set neighborhood = new HashSet(); + for(int i=-1; i <= 1; i++){ + Cell neighbor = new Cell(cell.x, cell.y + i); + + if(cells.contains(neighbor)) { + numNeighbors++; + } + } + return 0; } public void addCell(Cell cell) { - // TODO Auto-generated method stub + cells.add(cell); } diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index bbdc3b8..713fd15 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -14,7 +14,7 @@ public void testSingleCellOnGridHasNoNeighbors() { Cell cell = new Cell(0,0); //act grid.addCell(cell); - int numNeighbors = grid.getNeighbors(cell); + int numNeighbors = grid.getNumNeighbors(cell); //assert assertEquals(0, numNeighbors); } @@ -28,7 +28,7 @@ public void testSingleCellOnGridHasOneNeighbor() { //act grid.addCell(cell1); grid.addCell(cell2); - int numNeighbors = grid.getNeighbors(cell1); + int numNeighbors = grid.getNumNeighbors(cell1); //assert assertEquals(1, numNeighbors); } From c4259b62a9dbeb42a6cd6396bdbb4b4f4a859087 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:14:46 +0300 Subject: [PATCH 15/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 3 +++ src/org/unioulu/tol/sqatlab/gameoflife/Grid.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 9766fc2..50e61fc 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -90,3 +90,6 @@ RefactoringAction 1444385015037 Cell.java ADD int getX()/2 METHOD RefactoringAction 1444385017112 Cell.java RENAME getX()/2=>int getY() METHOD RefactoringAction 1444385509365 Grid.java RENAME getNeighbors(Cell)=>int getNumNeighbors(Cell) METHOD EditAction 1444385568913 TestGrid.java 792 2 12 2 +UnitTestCaseAction 1444385572423 TestGrid.java FAIL +UnitTestSessionAction 1444385572423 TestGrid FAIL +EditAction 1444385685296 Grid.java 517 2 5 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index 4cef97d..9b92a37 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -18,7 +18,7 @@ public int getNumNeighbors(Cell cell) { } } - return 0; + return numNeighbors-1; } public void addCell(Cell cell) { From 148df268e2f7d624ae76077eecc1e365efda9976 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:18:20 +0300 Subject: [PATCH 16/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 6 +++++ .../20151009120031690/besouroEpisodes.txt | 24 +++++++++++++++++++ .../randomHeuristicEpisodes.txt | 1 + .besouro/20151009120031690/zorroEpisodes.txt | 1 + .../unioulu/tol/sqatlab/gameoflife/Grid.java | 7 ++++-- 5 files changed, 37 insertions(+), 2 deletions(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 50e61fc..b65bd33 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -93,3 +93,9 @@ EditAction 1444385568913 TestGrid.java 792 2 12 2 UnitTestCaseAction 1444385572423 TestGrid.java FAIL UnitTestSessionAction 1444385572423 TestGrid FAIL EditAction 1444385685296 Grid.java 517 2 5 0 +UnitTestCaseAction 1444385689071 TestGrid.java OK +UnitTestSessionAction 1444385689071 TestGrid OK +RefactoringAction 1444385737667 TestGrid.java ADD void testSingleCellOnGridHasOneNeighbor()/2 METHOD +RefactoringAction 1444385740257 TestGrid.java RENAME testSingleCellOnGridHasOneNeighbor()/2=>void testTwoCellOnGridHasOneNeighbor() METHOD +RefactoringAction 1444385741817 TestGrid.java RENAME testTwoCellOnGridHasOneNeighbor()=>void testTwoCellsOnGridHasOneNeighbor() METHOD +EditAction 1444385899223 Grid.java 563 2 5 0 diff --git a/.besouro/20151009120031690/besouroEpisodes.txt b/.besouro/20151009120031690/besouroEpisodes.txt index 2aaf45e..855f958 100644 --- a/.besouro/20151009120031690/besouroEpisodes.txt +++ b/.besouro/20151009120031690/besouroEpisodes.txt @@ -10,3 +10,27 @@ 1444382674272 test-first 1 1442 true 1444382980138 production 1 271 false 1444383502114 test-last 1 410 false +1444385689071 test-first 1 2154 true +1444385689072 test-first 1 2154 true +1444385689073 test-first 1 2154 true +1444385689074 test-first 1 2154 true +1444385689075 test-first 1 2154 true +1444385689076 test-first 1 2154 true +1444385689077 test-first 1 2154 true +1444385689078 test-first 1 2154 true +1444385689079 test-first 1 2154 true +1444385689080 test-first 1 2154 true +1444385689081 test-first 1 2154 true +1444385689082 test-first 1 2154 true +1444385689083 test-first 1 2154 true +1444385689084 test-first 1 2154 true +1444385689085 test-first 1 2154 true +1444385689086 test-first 1 2154 true +1444385689087 test-first 1 2154 true +1444385689088 test-first 1 2154 true +1444385689089 test-first 1 2154 true +1444385689090 test-first 1 2154 true +1444385689091 test-first 1 2154 true +1444385689092 test-first 1 2154 true +1444385689093 test-first 1 2154 true +1444385689094 test-first 1 2154 true diff --git a/.besouro/20151009120031690/randomHeuristicEpisodes.txt b/.besouro/20151009120031690/randomHeuristicEpisodes.txt index 730b9d4..c065066 100644 --- a/.besouro/20151009120031690/randomHeuristicEpisodes.txt +++ b/.besouro/20151009120031690/randomHeuristicEpisodes.txt @@ -1,3 +1,4 @@ 1444382674263 test-first 1 1442 true 1444382980138 production 1 271 false 1444383502114 test-last 1 410 false +1444385689071 test-first 1 2154 true diff --git a/.besouro/20151009120031690/zorroEpisodes.txt b/.besouro/20151009120031690/zorroEpisodes.txt index f6f8d70..1209ec2 100644 --- a/.besouro/20151009120031690/zorroEpisodes.txt +++ b/.besouro/20151009120031690/zorroEpisodes.txt @@ -1,3 +1,4 @@ 1444382674263 test-first 1 1442 true 1444382980138 production 1 305 true 1444383502114 test-last 1 521 false +1444385689071 test-first 1 2186 true diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index 9b92a37..4637f2e 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -10,13 +10,16 @@ public class Grid { public int getNumNeighbors(Cell cell) { int numNeighbors = 0; Set neighborhood = new HashSet(); - for(int i=-1; i <= 1; i++){ - Cell neighbor = new Cell(cell.x, cell.y + i); + for(int dx=-1; dx <= 1; dx++){ + for(int dy=-1; dy <= 1; dy++){ + Cell neighbor = new Cell(cell.x, cell.y + dx); if(cells.contains(neighbor)) { numNeighbors++; } } + + } return numNeighbors-1; } From 6b8c2c9727d49e241e96438d0dd248fa63621fef Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:18:23 +0300 Subject: [PATCH 17/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 1 + .../tol/sqatlab/gameoflife/test/TestGrid.java | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index b65bd33..af4ce82 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -99,3 +99,4 @@ RefactoringAction 1444385737667 TestGrid.java ADD void testSingleCellOnGridHasOn RefactoringAction 1444385740257 TestGrid.java RENAME testSingleCellOnGridHasOneNeighbor()/2=>void testTwoCellOnGridHasOneNeighbor() METHOD RefactoringAction 1444385741817 TestGrid.java RENAME testTwoCellOnGridHasOneNeighbor()=>void testTwoCellsOnGridHasOneNeighbor() METHOD EditAction 1444385899223 Grid.java 563 2 5 0 +EditAction 1444385902468 TestGrid.java 1100 3 19 3 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index 713fd15..e48d15d 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -32,4 +32,18 @@ public void testSingleCellOnGridHasOneNeighbor() { //assert assertEquals(1, numNeighbors); } + + @Test + public void testTwoCellsOnGridHasOneNeighbor() { + //arrange + Grid grid = new Grid(); + Cell cell1 = new Cell(0,0); + Cell cell2 = new Cell(0,1); + //act + grid.addCell(cell1); + grid.addCell(cell2); + int numNeighbors = grid.getNumNeighbors(cell1); + //assert + assertEquals(1, numNeighbors); + } } From 3e25904dc8afb1eb373991414845e53e89076831 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:20:12 +0300 Subject: [PATCH 18/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 3 +++ src/org/unioulu/tol/sqatlab/gameoflife/Grid.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index af4ce82..949ec68 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -100,3 +100,6 @@ RefactoringAction 1444385740257 TestGrid.java RENAME testSingleCellOnGridHasOneN RefactoringAction 1444385741817 TestGrid.java RENAME testTwoCellOnGridHasOneNeighbor()=>void testTwoCellsOnGridHasOneNeighbor() METHOD EditAction 1444385899223 Grid.java 563 2 5 0 EditAction 1444385902468 TestGrid.java 1100 3 19 3 +UnitTestCaseAction 1444385908895 TestGrid.java FAIL +UnitTestSessionAction 1444385908895 TestGrid FAIL +EditAction 1444386011205 Grid.java 566 2 5 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index 4637f2e..81d6451 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -12,7 +12,7 @@ public int getNumNeighbors(Cell cell) { Set neighborhood = new HashSet(); for(int dx=-1; dx <= 1; dx++){ for(int dy=-1; dy <= 1; dy++){ - Cell neighbor = new Cell(cell.x, cell.y + dx); + Cell neighbor = new Cell(cell.x+dx, cell.y + dx); if(cells.contains(neighbor)) { numNeighbors++; From 86410faa59dd9810b79eaa2768019269a7e9237a Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:22:13 +0300 Subject: [PATCH 19/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 3 +++ src/org/unioulu/tol/sqatlab/gameoflife/Grid.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 949ec68..b00b708 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -103,3 +103,6 @@ EditAction 1444385902468 TestGrid.java 1100 3 19 3 UnitTestCaseAction 1444385908895 TestGrid.java FAIL UnitTestSessionAction 1444385908895 TestGrid FAIL EditAction 1444386011205 Grid.java 566 2 5 0 +UnitTestCaseAction 1444386014465 TestGrid.java FAIL +UnitTestSessionAction 1444386014465 TestGrid FAIL +EditAction 1444386132765 Grid.java 564 2 5 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index 81d6451..ff2a245 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -21,7 +21,7 @@ public int getNumNeighbors(Cell cell) { } - return numNeighbors-1; + return numNeighbors; } public void addCell(Cell cell) { From de00174db6fb25cdba4f64293a29a0fa1a0e27cb Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:23:35 +0300 Subject: [PATCH 20/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 3 +++ src/org/unioulu/tol/sqatlab/gameoflife/Grid.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index b00b708..bfc63f5 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -106,3 +106,6 @@ EditAction 1444386011205 Grid.java 566 2 5 0 UnitTestCaseAction 1444386014465 TestGrid.java FAIL UnitTestSessionAction 1444386014465 TestGrid FAIL EditAction 1444386132765 Grid.java 564 2 5 0 +UnitTestCaseAction 1444386136665 TestGrid.java FAIL +UnitTestSessionAction 1444386136665 TestGrid FAIL +EditAction 1444386214327 Grid.java 566 2 5 0 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index ff2a245..81d6451 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -21,7 +21,7 @@ public int getNumNeighbors(Cell cell) { } - return numNeighbors; + return numNeighbors-1; } public void addCell(Cell cell) { From eb2c1573ef4ab8c3fb459fd98e0384b122350fea Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:26:47 +0300 Subject: [PATCH 21/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 6 ++++++ src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index bfc63f5..5e2f311 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -109,3 +109,9 @@ EditAction 1444386132765 Grid.java 564 2 5 0 UnitTestCaseAction 1444386136665 TestGrid.java FAIL UnitTestSessionAction 1444386136665 TestGrid FAIL EditAction 1444386214327 Grid.java 566 2 5 0 +UnitTestCaseAction 1444386219740 TestGrid.java FAIL +UnitTestSessionAction 1444386219740 Rerun org.unioulu.tol.sqatlab.gameoflife.test.TestGrid.testSingleCellOnGridHasOneNeighbor FAIL +UnitTestCaseAction 1444386241379 TestGrid.java FAIL +UnitTestSessionAction 1444386241379 TestGrid FAIL +RefactoringAction 1444386395687 TestGrid.java REMOVE testTwoCellsOnGridHasOneNeighbor() METHOD +EditAction 1444386406030 TestGrid.java 1106 2 12 2 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index e48d15d..298875f 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -32,7 +32,7 @@ public void testSingleCellOnGridHasOneNeighbor() { //assert assertEquals(1, numNeighbors); } - + /* @Test public void testTwoCellsOnGridHasOneNeighbor() { //arrange @@ -46,4 +46,5 @@ public void testTwoCellsOnGridHasOneNeighbor() { //assert assertEquals(1, numNeighbors); } + */ } From 1f0d72ce43b94be3109b3b1b357391faefce9ee8 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:27:09 +0300 Subject: [PATCH 22/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 6 ++++++ src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 5e2f311..429352f 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -115,3 +115,9 @@ UnitTestCaseAction 1444386241379 TestGrid.java FAIL UnitTestSessionAction 1444386241379 TestGrid FAIL RefactoringAction 1444386395687 TestGrid.java REMOVE testTwoCellsOnGridHasOneNeighbor() METHOD EditAction 1444386406030 TestGrid.java 1106 2 12 2 +UnitTestCaseAction 1444386411537 TestGrid.java FAIL +UnitTestSessionAction 1444386411537 TestGrid FAIL +RefactoringAction 1444386415827 TestGrid.java RENAME testSingleCellOnGridHasOneNeighbor()=>void testTwoCellOnGridHasOneNeighbor() METHOD +RefactoringAction 1444386418417 TestGrid.java RENAME testTwoCellOnGridHasOneNeighbor()=>void testTwoNeighborCellOnGridHasOneNeighbor() METHOD +RefactoringAction 1444386419462 TestGrid.java RENAME testTwoNeighborCellOnGridHasOneNeighbor()=>void testTwoNeighborCellsOnGridHasOneNeighbor() METHOD +EditAction 1444386427809 TestGrid.java 1112 2 12 2 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index 298875f..4cda8fb 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -20,7 +20,7 @@ public void testSingleCellOnGridHasNoNeighbors() { } @Test - public void testSingleCellOnGridHasOneNeighbor() { + public void testTwoNeighborCellsOnGridHasOneNeighbor() { //arrange Grid grid = new Grid(); Cell cell1 = new Cell(0,0); From 0f9bf46205a0ca0a1434a0eb61cae0c58da60136 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:28:49 +0300 Subject: [PATCH 23/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 5 +++++ src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 429352f..acc0b86 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -121,3 +121,8 @@ RefactoringAction 1444386415827 TestGrid.java RENAME testSingleCellOnGridHasOneN RefactoringAction 1444386418417 TestGrid.java RENAME testTwoCellOnGridHasOneNeighbor()=>void testTwoNeighborCellOnGridHasOneNeighbor() METHOD RefactoringAction 1444386419462 TestGrid.java RENAME testTwoNeighborCellOnGridHasOneNeighbor()=>void testTwoNeighborCellsOnGridHasOneNeighbor() METHOD EditAction 1444386427809 TestGrid.java 1112 2 12 2 +UnitTestCaseAction 1444386431319 TestGrid.java FAIL +UnitTestSessionAction 1444386431319 TestGrid FAIL +RefactoringAction 1444386513254 TestGrid.java RENAME testTwoNeighborCellsOnGridHasOneNeighbor()=>void testSingleCellOnGridHasOneNeighbor() METHOD +RefactoringAction 1444386518418 TestGrid.java ADD void testTwoCellsOnGridHasOneNeighbor() METHOD +EditAction 1444386527809 TestGrid.java 1102 3 19 3 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index 4cda8fb..6138a96 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -20,7 +20,7 @@ public void testSingleCellOnGridHasNoNeighbors() { } @Test - public void testTwoNeighborCellsOnGridHasOneNeighbor() { + public void testSingleCellOnGridHasOneNeighbor() { //arrange Grid grid = new Grid(); Cell cell1 = new Cell(0,0); @@ -32,7 +32,7 @@ public void testTwoNeighborCellsOnGridHasOneNeighbor() { //assert assertEquals(1, numNeighbors); } - /* + @Test public void testTwoCellsOnGridHasOneNeighbor() { //arrange @@ -46,5 +46,5 @@ public void testTwoCellsOnGridHasOneNeighbor() { //assert assertEquals(1, numNeighbors); } - */ + } From f03470265e7c60cdfe2eb6b2149e2aa088d1e9ac Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:46:30 +0300 Subject: [PATCH 24/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 18 ++++++++++++++++++ .../unioulu/tol/sqatlab/gameoflife/Grid.java | 8 ++++---- .../tol/sqatlab/gameoflife/test/TestGrid.java | 14 ++++++++++++++ 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index acc0b86..51ad6ad 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -126,3 +126,21 @@ UnitTestSessionAction 1444386431319 TestGrid FAIL RefactoringAction 1444386513254 TestGrid.java RENAME testTwoNeighborCellsOnGridHasOneNeighbor()=>void testSingleCellOnGridHasOneNeighbor() METHOD RefactoringAction 1444386518418 TestGrid.java ADD void testTwoCellsOnGridHasOneNeighbor() METHOD EditAction 1444386527809 TestGrid.java 1102 3 19 3 +UnitTestCaseAction 1444386533645 TestGrid.java FAIL +UnitTestSessionAction 1444386533645 TestGrid FAIL +UnitTestCaseAction 1444386947752 TestGrid.java FAIL +UnitTestSessionAction 1444386947752 TestGrid FAIL +UnitTestCaseAction 1444387045834 TestGrid.java FAIL +UnitTestSessionAction 1444387045834 TestGrid FAIL +UnitTestCaseAction 1444387161733 TestGrid.java FAIL +UnitTestSessionAction 1444387161733 TestGrid FAIL +UnitTestCaseAction 1444387221406 TestCell.java OK +UnitTestSessionAction 1444387221406 TestCell OK +UnitTestCaseAction 1444387224354 TestGrid.java FAIL +UnitTestSessionAction 1444387224354 TestGrid FAIL +UnitTestCaseAction 1444387418926 TestGrid.java OK +UnitTestSessionAction 1444387418926 TestGrid OK +RefactoringAction 1444387505902 TestGrid.java ADD void testTwoCellsOnGridHasOneNeighbor()/2 METHOD +RefactoringAction 1444387509521 TestGrid.java RENAME testTwoCellsOnGridHasOneNeighbor()/2=>void testTwoSeparateCellsOnGridHasOneNeighbor() METHOD +RefactoringAction 1444387515714 TestGrid.java RENAME testTwoSeparateCellsOnGridHasOneNeighbor()=>void testTwoSeparateCellsOnGridHasNoNeighbors() METHOD +EditAction 1444387588836 TestGrid.java 1418 4 26 4 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java index 81d6451..3508516 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Grid.java @@ -12,12 +12,12 @@ public int getNumNeighbors(Cell cell) { Set neighborhood = new HashSet(); for(int dx=-1; dx <= 1; dx++){ for(int dy=-1; dy <= 1; dy++){ - Cell neighbor = new Cell(cell.x+dx, cell.y + dx); + Cell neighbor = new Cell(cell.x+dx, cell.y + dy); - if(cells.contains(neighbor)) { - numNeighbors++; + if(cells.contains(neighbor)) { + numNeighbors++; + } } - } } diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index 6138a96..2951a1f 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -47,4 +47,18 @@ public void testTwoCellsOnGridHasOneNeighbor() { assertEquals(1, numNeighbors); } + @Test + public void testTwoSeparateCellsOnGridHasNoNeighbors() { + //arrange + Grid grid = new Grid(); + Cell cell1 = new Cell(0,0); + Cell cell2 = new Cell(0,2); + //act + grid.addCell(cell1); + grid.addCell(cell2); + int numNeighbors = grid.getNumNeighbors(cell1); + //assert + assertEquals(0, numNeighbors); + } + } From f316ca8404fb0dd7572c2d26b298a668f3d85d81 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:47:44 +0300 Subject: [PATCH 25/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 3 +++ src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 51ad6ad..b87285f 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -144,3 +144,6 @@ RefactoringAction 1444387505902 TestGrid.java ADD void testTwoCellsOnGridHasOneN RefactoringAction 1444387509521 TestGrid.java RENAME testTwoCellsOnGridHasOneNeighbor()/2=>void testTwoSeparateCellsOnGridHasOneNeighbor() METHOD RefactoringAction 1444387515714 TestGrid.java RENAME testTwoSeparateCellsOnGridHasOneNeighbor()=>void testTwoSeparateCellsOnGridHasNoNeighbors() METHOD EditAction 1444387588836 TestGrid.java 1418 4 26 4 +UnitTestCaseAction 1444387592143 TestGrid.java OK +UnitTestSessionAction 1444387592143 TestGrid OK +EditAction 1444387663953 TestGrid.java 1505 4 28 5 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index 2951a1f..a4b9eee 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -56,9 +56,11 @@ public void testTwoSeparateCellsOnGridHasNoNeighbors() { //act grid.addCell(cell1); grid.addCell(cell2); - int numNeighbors = grid.getNumNeighbors(cell1); + int numNeighbors1 = grid.getNumNeighbors(cell1); + int numNeighbors2 = grid.getNumNeighbors(cell2); //assert - assertEquals(0, numNeighbors); + assertEquals(0, numNeighbors1); + assertEquals(0, numNeighbors2); } } From 6eaafa1a5372001b2e4bd0f008b437bd068a723e Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:51:10 +0300 Subject: [PATCH 26/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 7 +++++++ .../tol/sqatlab/gameoflife/test/TestGrid.java | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index b87285f..ca26a86 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -147,3 +147,10 @@ EditAction 1444387588836 TestGrid.java 1418 4 26 4 UnitTestCaseAction 1444387592143 TestGrid.java OK UnitTestSessionAction 1444387592143 TestGrid OK EditAction 1444387663953 TestGrid.java 1505 4 28 5 +UnitTestCaseAction 1444387685826 TestGrid.java OK +UnitTestSessionAction 1444387685826 TestGrid OK +RefactoringAction 1444387802675 TestGrid.java ADD void test FIELD +RefactoringAction 1444387805265 TestGrid.java RENAME test=>void testSingleCell FIELD +RefactoringAction 1444387813517 TestGrid.java RENAME testSingleCell=>void testSingleCellWithThreeNeighborsShouldDie FIELD +RefactoringAction 1444387816091 TestGrid.java RENAME testSingleCellWithThreeNeighborsShouldDie=>void testSingleCellWithThreeNeighborsShouldDie() METHOD +EditAction 1444387869805 TestGrid.java 1863 5 37 6 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index a4b9eee..a00e8a5 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -63,4 +63,22 @@ public void testTwoSeparateCellsOnGridHasNoNeighbors() { assertEquals(0, numNeighbors2); } + @Test + public void testSingleCellWithThreeNeighborsShouldDie() { + Grid grid = new Grid(); + Cell cell1 = new Cell(0,0); + Cell cell2 = new Cell(0,2); + Cell cell3 = new Cell(1,0); + //act + grid.addCell(cell1); + grid.addCell(cell2); + grid.addCell(cell3); + + int numNeighbors = grid.getNumNeighbors(cell1); + + assertEquals(0, numNeighbors1); + } + + + } From 0c9e4cb44e6c71b6b0cd8567174f8132b7f62696 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:51:47 +0300 Subject: [PATCH 27/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 5 +++++ src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index ca26a86..bce60d3 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -154,3 +154,8 @@ RefactoringAction 1444387805265 TestGrid.java RENAME test=>void testSingleCell F RefactoringAction 1444387813517 TestGrid.java RENAME testSingleCell=>void testSingleCellWithThreeNeighborsShouldDie FIELD RefactoringAction 1444387816091 TestGrid.java RENAME testSingleCellWithThreeNeighborsShouldDie=>void testSingleCellWithThreeNeighborsShouldDie() METHOD EditAction 1444387869805 TestGrid.java 1863 5 37 6 +CompilationAction 1444387872738 TestGrid.java +CompilationAction 1444387892987 TestGrid.java +UnitTestCaseAction 1444387895904 TestGrid.java OK +UnitTestSessionAction 1444387895904 TestGrid OK +EditAction 1444387906700 TestGrid.java 1916 5 39 6 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index a00e8a5..efdfe98 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -69,14 +69,16 @@ public void testSingleCellWithThreeNeighborsShouldDie() { Cell cell1 = new Cell(0,0); Cell cell2 = new Cell(0,2); Cell cell3 = new Cell(1,0); + Cell cell4 = new Cell(-1,0); //act grid.addCell(cell1); grid.addCell(cell2); grid.addCell(cell3); + grid.addCell(cell4); - int numNeighbors = grid.getNumNeighbors(cell1); + int numNeighbors = grid.getNumNeighbors(cell2); - assertEquals(0, numNeighbors1); + assertEquals(0, numNeighbors); } From 732cc54a457cfc0f88b103462a4e4be47da94d4b Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:52:47 +0300 Subject: [PATCH 28/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 4 ++++ src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index bce60d3..0badcea 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -159,3 +159,7 @@ CompilationAction 1444387892987 TestGrid.java UnitTestCaseAction 1444387895904 TestGrid.java OK UnitTestSessionAction 1444387895904 TestGrid OK EditAction 1444387906700 TestGrid.java 1916 5 39 6 +UnitTestCaseAction 1444387910959 TestGrid.java OK +UnitTestSessionAction 1444387910975 TestGrid OK +RefactoringAction 1444387939057 TestGrid.java RENAME testSingleCellWithThreeNeighborsShouldDie()=>void testSingleCellWithMoreThanThreeNeighborsShouldDie() METHOD +EditAction 1444387966466 TestGrid.java 1977 5 41 6 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index efdfe98..220a1ed 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -64,17 +64,19 @@ public void testTwoSeparateCellsOnGridHasNoNeighbors() { } @Test - public void testSingleCellWithThreeNeighborsShouldDie() { + public void testSingleCellWithMoreThanThreeNeighborsShouldDie() { Grid grid = new Grid(); Cell cell1 = new Cell(0,0); - Cell cell2 = new Cell(0,2); + Cell cell2 = new Cell(0,1); Cell cell3 = new Cell(1,0); - Cell cell4 = new Cell(-1,0); + Cell cell4 = new Cell(1,1); + Cell cell5 = new Cell(-1,0); //act grid.addCell(cell1); grid.addCell(cell2); grid.addCell(cell3); grid.addCell(cell4); + grid.addCell(cell5); int numNeighbors = grid.getNumNeighbors(cell2); From c6629557855ba1177e1a12014b24e883b0a46b23 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:52:57 +0300 Subject: [PATCH 29/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 1 + src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 0badcea..893915a 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -163,3 +163,4 @@ UnitTestCaseAction 1444387910959 TestGrid.java OK UnitTestSessionAction 1444387910975 TestGrid OK RefactoringAction 1444387939057 TestGrid.java RENAME testSingleCellWithThreeNeighborsShouldDie()=>void testSingleCellWithMoreThanThreeNeighborsShouldDie() METHOD EditAction 1444387966466 TestGrid.java 1977 5 41 6 +EditAction 1444387976171 TestGrid.java 1977 5 41 6 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index 220a1ed..4982b66 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -80,7 +80,7 @@ public void testSingleCellWithMoreThanThreeNeighborsShouldDie() { int numNeighbors = grid.getNumNeighbors(cell2); - assertEquals(0, numNeighbors); + assertEquals(4, numNeighbors); } From a1de3037ab4a3548cd4676ab5848e1ffe2faa454 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:54:32 +0300 Subject: [PATCH 30/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 6 ++++++ .../tol/sqatlab/gameoflife/test/TestGrid.java | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 893915a..d271779 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -164,3 +164,9 @@ UnitTestSessionAction 1444387910975 TestGrid OK RefactoringAction 1444387939057 TestGrid.java RENAME testSingleCellWithThreeNeighborsShouldDie()=>void testSingleCellWithMoreThanThreeNeighborsShouldDie() METHOD EditAction 1444387966466 TestGrid.java 1977 5 41 6 EditAction 1444387976171 TestGrid.java 1977 5 41 6 +UnitTestCaseAction 1444387982161 TestGrid.java OK +UnitTestSessionAction 1444387982161 TestGrid OK +RefactoringAction 1444388025733 TestGrid.java ADD void testTwoSeparateCellsOnGridHasNoNeighbors()/2 METHOD +RefactoringAction 1444388034001 TestGrid.java RENAME testTwoSeparateCellsOnGridHasNoNeighbors()/2=>void testSingleCellsOnGridHasNoNeighbors() METHOD +RefactoringAction 1444388037621 TestGrid.java RENAME testSingleCellsOnGridHasNoNeighbors()=>void testSingleCellsOnGridHasThreeNeighbors() METHOD +EditAction 1444388071865 TestGrid.java 2417 6 53 8 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index 4982b66..0229a31 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -63,6 +63,24 @@ public void testTwoSeparateCellsOnGridHasNoNeighbors() { assertEquals(0, numNeighbors2); } + @Test + public void testSingleCellsOnGridHasThreeNeighbors() { + //arrange + Grid grid = new Grid(); + Cell cell1 = new Cell(0,0); + Cell cell2 = new Cell(0,1); + Cell cell3 = new Cell(1,0); + Cell cell4 = new Cell(1,1); + //act + grid.addCell(cell1); + grid.addCell(cell2); + grid.addCell(cell3); + grid.addCell(cell4); + int numNeighbors1 = grid.getNumNeighbors(cell2); + //assert + assertEquals(0, numNeighbors1); + } + @Test public void testSingleCellWithMoreThanThreeNeighborsShouldDie() { Grid grid = new Grid(); @@ -81,6 +99,7 @@ public void testSingleCellWithMoreThanThreeNeighborsShouldDie() { int numNeighbors = grid.getNumNeighbors(cell2); assertEquals(4, numNeighbors); + assertEquals(); } From 695a1e781c8c03022dcc78d702479cf82f14002a Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:55:48 +0300 Subject: [PATCH 31/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 2 ++ src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index d271779..b61ed14 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -170,3 +170,5 @@ RefactoringAction 1444388025733 TestGrid.java ADD void testTwoSeparateCellsOnGri RefactoringAction 1444388034001 TestGrid.java RENAME testTwoSeparateCellsOnGridHasNoNeighbors()/2=>void testSingleCellsOnGridHasNoNeighbors() METHOD RefactoringAction 1444388037621 TestGrid.java RENAME testSingleCellsOnGridHasNoNeighbors()=>void testSingleCellsOnGridHasThreeNeighbors() METHOD EditAction 1444388071865 TestGrid.java 2417 6 53 8 +CompilationAction 1444388074626 TestGrid.java +EditAction 1444388147076 TestGrid.java 2441 6 53 8 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index 0229a31..36aae14 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -96,10 +96,10 @@ public void testSingleCellWithMoreThanThreeNeighborsShouldDie() { grid.addCell(cell4); grid.addCell(cell5); - int numNeighbors = grid.getNumNeighbors(cell2); + int numNeighbors = grid.getNumNeighbors(cell1); assertEquals(4, numNeighbors); - assertEquals(); + assertEquals("Dead", cell1.getState()); } From 01b6dc4d7da8060059829956c7c57783e798e5e1 Mon Sep 17 00:00:00 2001 From: somename Date: Fri, 9 Oct 2015 13:56:06 +0300 Subject: [PATCH 32/33] besouro automatic message --- .besouro/20151009120031690/actions.txt | 3 +++ src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index b61ed14..06f6baa 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -172,3 +172,6 @@ RefactoringAction 1444388037621 TestGrid.java RENAME testSingleCellsOnGridHasNoN EditAction 1444388071865 TestGrid.java 2417 6 53 8 CompilationAction 1444388074626 TestGrid.java EditAction 1444388147076 TestGrid.java 2441 6 53 8 +UnitTestCaseAction 1444388151741 TestGrid.java FAIL +UnitTestSessionAction 1444388151741 TestGrid FAIL +EditAction 1444388165596 TestGrid.java 2439 6 53 8 diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java index 36aae14..ca94389 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/test/TestGrid.java @@ -76,9 +76,9 @@ public void testSingleCellsOnGridHasThreeNeighbors() { grid.addCell(cell2); grid.addCell(cell3); grid.addCell(cell4); - int numNeighbors1 = grid.getNumNeighbors(cell2); + int numNeighbors = grid.getNumNeighbors(cell2); //assert - assertEquals(0, numNeighbors1); + assertEquals(3, numNeighbors); } @Test From 3148a705da5d3f0cfb337bfd583cd4cbaa77ac94 Mon Sep 17 00:00:00 2001 From: aasalo Date: Fri, 9 Oct 2015 14:04:09 +0300 Subject: [PATCH 33/33] Rules 1-2 covered, rule 3 under work --- .besouro/20151009120031690/actions.txt | 4 ++++ src/org/unioulu/tol/sqatlab/gameoflife/Cell.java | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.besouro/20151009120031690/actions.txt b/.besouro/20151009120031690/actions.txt index 06f6baa..c97ebc5 100644 --- a/.besouro/20151009120031690/actions.txt +++ b/.besouro/20151009120031690/actions.txt @@ -175,3 +175,7 @@ EditAction 1444388147076 TestGrid.java 2441 6 53 8 UnitTestCaseAction 1444388151741 TestGrid.java FAIL UnitTestSessionAction 1444388151741 TestGrid FAIL EditAction 1444388165596 TestGrid.java 2439 6 53 8 +UnitTestCaseAction 1444388171446 TestGrid.java FAIL +UnitTestSessionAction 1444388171446 TestGrid FAIL +UnitTestCaseAction 1444388341464 TestGrid.java FAIL +UnitTestSessionAction 1444388341464 TestGrid FAIL diff --git a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java index 1cfab82..4b2d8ec 100644 --- a/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java +++ b/src/org/unioulu/tol/sqatlab/gameoflife/Cell.java @@ -27,7 +27,10 @@ public void nextIteration(int numOfLiveCells) { if(state == "Alive" && numOfLiveCells < 2){ state = "Dead"; }else - state = "Alive"; + if (state == "Alive" && numOfLiveCells > 3){ + state = "Dead"; + }else + state ="Alive"; } public Object getState() {