Browse Source

Test2 EQUILATERAL

master
Moritz Neumeier 3 years ago
parent
commit
bc101fecf2

BIN
out/production/TriangleCheckerAssignment/TriangleChecker.class View File


BIN
out/test/TriangleCheckerAssignment/TriangleCheckerTest.class View File


+ 4
- 0
src/TriangleChecker.java View File



return TriangleType.NONE; return TriangleType.NONE;
} }

if(a == b && b==c) {
return TriangleType.EQUILATERAL;
}
return TriangleType.NORMAL; return TriangleType.NORMAL;





+ 18
- 1
test/TriangleCheckerTest.java View File

// Assert // Assert
assertEquals(TriangleChecker.TriangleType.NORMAL, type); assertEquals(TriangleChecker.TriangleType.NORMAL, type);



}

@Test
public void testEquilateralTriangle() {

// Arrange
float a = 5;
float b = 5;
float c = 5;

// Act
TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a, b, c);

// Assert
assertEquals(TriangleChecker.TriangleType.EQUILATERAL, type);


} }


} }

Loading…
Cancel
Save