Browse Source

geändert am 21.11.2023 um 16:33

master
leonmcfly 11 months ago
parent
commit
a41d8d097a
1 changed files with 43 additions and 0 deletions
  1. 43
    0
      test/Praktikum03/TriangleCheckerTest.java

+ 43
- 0
test/Praktikum03/TriangleCheckerTest.java View File

@@ -0,0 +1,43 @@
package Praktikum03;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

class TriangleCheckerTest {

@Test
void checkTriangle() {
int a = 3;





}

@Test
void checkNormalTriangle() {

float a = 3.0f;
float b = 4.0f;
float c = 2.0f;

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

assertEquals(TriangleChecker.TriangleType.NORMAL, type);

}

@Test
void checkEquilateralTriangle() {

float a = 3.0f;


TriangleChecker.TriangleType type = TriangleChecker.checkTriangle(a,a,a);

assertEquals(TriangleChecker.TriangleType.EQUILATERAL, type);

}
}

Loading…
Cancel
Save