spacerose

Untitled

Sep 27th, 2021
866
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.example.demo;
  2.  
  3.  
  4. import org.junit.Assert;
  5.  
  6. import org.junit.jupiter.api.Test;
  7.  
  8.  
  9.  
  10. public class StudentServiceTest {
  11.  
  12.  
  13. Student newStudent=new Student("name","surname","middlename");
  14.  
  15.  
  16.         StudentService ss =new StudentService();
  17.         @Test
  18.         void save() {
  19.                 Assert.assertTrue(ss.save(newStudent));
  20.  
  21.         }
  22.  
  23.         @Test
  24.         void find() {
  25.                 Assert.assertEquals((new Student("","Not found","")).lastName, ss.find("test").lastName);
  26.         }
  27.  
  28.         @Test
  29.         void remove() {
  30.                 Assert.assertEquals((new Student("","Not found","")).lastName, ss.find("test").lastName);
  31.         }
  32. }
  33.  
RAW Paste Data