[#6] cover the models module with junit tests #9

Merged
orikik merged 3 commits from orikik/frostfs-sdk-java:feature/unit-tests-models into master 2024-09-04 19:51:24 +00:00
Showing only changes of commit 0d76332f01 - Show all commits

View file

@ -9,14 +9,14 @@ import java.io.IOException;
import static java.util.Objects.isNull;
public class SessionMapper {
private static final String ERROR_TOKEN_MISSING_ERROR = "Token is not present";
private static final String ERROR_TOKEN_MISSING_MESSAGE = "Token is not present";
Outdated
Review

error passed throw the error
error looking to the error
error error error

error passed throw the error error looking to the error error error error

My bad, fixed it

My bad, fixed it
private SessionMapper() {
}
public static byte[] serialize(Types.SessionToken token) {
if (isNull(token)) {
throw new IllegalArgumentException(ERROR_TOKEN_MISSING_ERROR);
throw new IllegalArgumentException(ERROR_TOKEN_MISSING_MESSAGE);
}
try {
@ -31,7 +31,7 @@ public class SessionMapper {
public static Types.SessionToken deserializeSessionToken(byte[] bytes) {
if (isNull(bytes) || bytes.length == 0) {
throw new IllegalArgumentException(ERROR_TOKEN_MISSING_ERROR);
throw new IllegalArgumentException(ERROR_TOKEN_MISSING_MESSAGE);
}
try {