Mapper test
This commit is contained in:
parent
468b6e6b87
commit
7d57157078
@ -2,11 +2,31 @@ package com.plannaplan.responses.mappers;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.plannaplan.entities.User;
|
||||
import com.plannaplan.types.UserRoles;
|
||||
import com.plannaplan.responses.models.SearchForStudentsResponse;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class UserResponseMappersTest {
|
||||
private static final String F_NAME = "Tytus";
|
||||
private static final String F_SURNAMENAME = "Romek";
|
||||
private static final String F_EMAIL = "i@Atomek.pl";
|
||||
|
||||
private static final String S_NAME = "Ed";
|
||||
private static final String S_SURNAMENAME = "Edd";
|
||||
private static final String S_EMAIL = "i@Eddy.pl";
|
||||
|
||||
@Test
|
||||
public void shlouldMapListToResponseList() {
|
||||
assertTrue(false);
|
||||
final List<User> users = Arrays.asList(new User(F_NAME, F_SURNAMENAME, F_EMAIL, UserRoles.TEST_USER),
|
||||
new User(S_NAME, S_SURNAMENAME, S_EMAIL, UserRoles.TEST_USER));
|
||||
|
||||
final List<SearchForStudentsResponse> resposne = UserResponseMappers.mapToDefaultResponse(users);
|
||||
assertTrue(resposne.size() == 2);
|
||||
assertTrue(resposne.get(0) instanceof SearchForStudentsResponse);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user