forked from TheAlgorithms/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathperimeterTest.java
More file actions
37 lines (32 loc) · 912 Bytes
/
Copy pathperimeterTest.java
File metadata and controls
37 lines (32 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.thealgorithms.maths;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class perimeterTest {
//Perimeter of polygon
@Test
void testcase1(){
Assertions.assertEquals(20.0,Perimeter.perimeter_polygon(4,5));
}
@Test
void testcase2(){
Assertions.assertEquals(30.0,Perimeter.perimeter_polygon(5,6));
}
//Perimeter of Rectangle
@Test
void testcase3(){
Assertions.assertEquals(18.0,Perimeter.perimeter_rectangle(4,5));
}
@Test
void testcase4(){
Assertions.assertEquals(14.0,Perimeter.perimeter_rectangle(4,3));
}
//Circumference of a circle
@Test
void testcase5(){
Assertions.assertEquals(31.41592653589793,Perimeter.circumference(5));
}
@Test
void testcase6(){
Assertions.assertEquals(43.982297150257104,Perimeter.circumference(7));
}
}