valiamaximova1

CalculationTest java

Feb 18th, 2021 (edited)
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. import org.junit.jupiter.api.Test;
  2. import static org.junit.jupiter.api.Assertions.*;
  3.  
  4. class CalculationTest {
  5.  
  6.     @Test
  7.     void maxTest() throws Exception {
  8.         int[] arr = {10, 22, 35, 46, 52, 68};
  9.         int maxValue = Calculation.findMax(arr);
  10.         int expectedMaxNumber = 68;
  11.         assertEquals(68, maxValue );
  12.  
  13.     }
  14.  
  15.     @Test
  16.     void cube() throws Exception {
  17.         int num = Calculation.cube(4);
  18.         int expectedNumber = 64;
  19.         assertEquals(expectedNumber, num);
  20.  
  21.     }
  22.  
  23. }
Add Comment
Please, Sign In to add comment