Add links map

This commit is contained in:
René Pfeuffer
2018-05-28 14:13:47 +02:00
parent 61c2e942be
commit 6ac0765788
5 changed files with 66 additions and 10 deletions

View File

@@ -0,0 +1,23 @@
package sonia.scm.api.rest.resources;
import org.junit.Test;
import sonia.scm.user.User;
import javax.ws.rs.core.UriInfo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.mockito.Mockito.mock;
public class UserMapperTest {
@Test
public void shouldMapLinks() {
User user = new User();
user.setName("abc");
UserDto userDto = UserMapper.INSTANCE.userToUserDto(user, mock(UriInfo.class));
assertEquals("abc" , userDto.getName());
assertNotNull("expected map with links", userDto.getLinks());
}
}