Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7cb41cd
besouro automatic message
Oct 9, 2015
4a4ec5a
besouro automatic message
Oct 9, 2015
1a40f81
besouro automatic message
Oct 9, 2015
1eee849
besouro automatic message
Oct 9, 2015
66c130d
besouro automatic message
Oct 9, 2015
0ffbacc
besouro automatic message
Oct 9, 2015
cc765dd
besouro automatic message
Oct 9, 2015
00768b6
besouro automatic message
Oct 9, 2015
d5a97dd
besouro automatic message
Oct 9, 2015
52f47d3
besouro automatic message
Oct 9, 2015
0d789a1
besouro automatic message
Oct 9, 2015
656e006
besouro automatic message
Oct 9, 2015
a59c588
besouro automatic message
Oct 9, 2015
00596bd
besouro automatic message
Oct 9, 2015
c4259b6
besouro automatic message
Oct 9, 2015
148df26
besouro automatic message
Oct 9, 2015
6b8c2c9
besouro automatic message
Oct 9, 2015
3e25904
besouro automatic message
Oct 9, 2015
86410fa
besouro automatic message
Oct 9, 2015
de00174
besouro automatic message
Oct 9, 2015
eb2c157
besouro automatic message
Oct 9, 2015
1f0d72c
besouro automatic message
Oct 9, 2015
0f9bf46
besouro automatic message
Oct 9, 2015
f034702
besouro automatic message
Oct 9, 2015
f316ca8
besouro automatic message
Oct 9, 2015
6eaafa1
besouro automatic message
Oct 9, 2015
0c9e4cb
besouro automatic message
Oct 9, 2015
732cc54
besouro automatic message
Oct 9, 2015
c662955
besouro automatic message
Oct 9, 2015
a1de303
besouro automatic message
Oct 9, 2015
695a1e7
besouro automatic message
Oct 9, 2015
01b6dc4
besouro automatic message
Oct 9, 2015
3148a70
Rules 1-2 covered,
Oct 9, 2015
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
181 changes: 181 additions & 0 deletions .besouro/20151009120031690/actions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
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
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
RefactoringAction 1444382489151 TestCell.java ADD void testLiveCellWithNoNeighborsShouldDie()/2 METHOD
RefactoringAction 1444382496904 TestCell.java RENAME testLiveCellWithNoNeighborsShouldDie()/2=><initializer /1> null
RefactoringAction 1444382509774 TestCell.java RENAME <initializer /1>=>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
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
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
UnitTestCaseAction 1444382980138 TestCell.java OK
UnitTestSessionAction 1444382980138 TestCell OK
FileOpenedAction 1444383091965 TestGrid.java 199 1 1 0
RefactoringAction 1444383105851 TestGrid.java RENAME test()=><initializer /1> null
RefactoringAction 1444383110484 TestGrid.java RENAME <initializer /1>=>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
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
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
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
UnitTestCaseAction 1444384063588 TestGrid.java FAIL
UnitTestSessionAction 1444384063588 TestGrid FAIL
RefactoringAction 1444384256432 Grid.java ADD Array<Cell> arrayOfCells FIELD
RefactoringAction 1444384318290 Grid.java REMOVE arrayOfCells FIELD
RefactoringAction 1444384601211 Grid.java ADD Set<Cell> 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
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
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
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
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
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
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
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
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
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
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
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
UnitTestCaseAction 1444388171446 TestGrid.java FAIL
UnitTestSessionAction 1444388171446 TestGrid FAIL
UnitTestCaseAction 1444388341464 TestGrid.java FAIL
UnitTestSessionAction 1444388341464 TestGrid FAIL
36 changes: 36 additions & 0 deletions .besouro/20151009120031690/besouroEpisodes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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
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
Empty file.
4 changes: 4 additions & 0 deletions .besouro/20151009120031690/randomHeuristicEpisodes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +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
Empty file.
4 changes: 4 additions & 0 deletions .besouro/20151009120031690/zorroEpisodes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +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
62 changes: 62 additions & 0 deletions src/org/unioulu/tol/sqatlab/gameoflife/Cell.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,66 @@

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 int getX(){
return x;
}

public int getY(){
return y;
}

public void nextIteration(int numOfLiveCells) {
if(state == "Alive" && numOfLiveCells < 2){
state = "Dead";
}else
if (state == "Alive" && numOfLiveCells > 3){
state = "Dead";
}else
state ="Alive";
}

public Object getState() {
// TODO Auto-generated method stub

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;
}

}
29 changes: 29 additions & 0 deletions src/org/unioulu/tol/sqatlab/gameoflife/Grid.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
package org.unioulu.tol.sqatlab.gameoflife;

import java.util.HashSet;
import java.util.Set;

public class Grid {

private Set<Cell> cells = new HashSet<>();

public int getNumNeighbors(Cell cell) {
int numNeighbors = 0;
Set<Cell> neighborhood = new HashSet<Cell>();
for(int dx=-1; dx <= 1; dx++){
for(int dy=-1; dy <= 1; dy++){
Cell neighbor = new Cell(cell.x+dx, cell.y + dy);

if(cells.contains(neighbor)) {
numNeighbors++;
}
}

}

return numNeighbors-1;
}

public void addCell(Cell cell) {

cells.add(cell);
}



}
22 changes: 20 additions & 2 deletions src/org/unioulu/tol/sqatlab/gameoflife/test/TestCell.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,30 @@
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(0);
//assert
assertEquals("Dead", cell.getState());
}

@Test
public void testLiveCellWithTwoNeighborsShouldLive() {
//arrange
Cell cell = new Cell("Alive");
//
cell.nextIteration(2);
//assert
assertEquals("Alive", cell.getState());
}



}
Loading