Skip to content

Commit

Permalink
minor test improvement
Browse files Browse the repository at this point in the history
Signed-off-by: Atanas Atanasov <[email protected]>
  • Loading branch information
ata-nas committed Dec 4, 2024
1 parent fe6dc01 commit b37fbc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
package com.hedera.block.server.persistence.storage.path;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;

import java.nio.file.Path;
import java.util.stream.Stream;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest;
Expand Down Expand Up @@ -55,7 +55,7 @@ void setUp() {
@MethodSource("validBlockNumbers")
void testSuccessfulPathResolution(final long toResolve, final Path expected) {
final Path actual = toTest.resolvePathToBlock(toResolve);
assertThat(actual).isNotNull().isEqualTo(expected);
assertThat(actual).isNotNull().isAbsolute().isEqualByComparingTo(expected);
}

/**
Expand All @@ -69,7 +69,7 @@ void testSuccessfulPathResolution(final long toResolve, final Path expected) {
@ParameterizedTest
@MethodSource("invalidBlockNumbers")
void testInvalidBlockNumber(final long toResolve) {
Assertions.assertThatIllegalArgumentException().isThrownBy(() -> toTest.resolvePathToBlock(toResolve));
assertThatIllegalArgumentException().isThrownBy(() -> toTest.resolvePathToBlock(toResolve));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void setUp() {
@MethodSource("validBlockNumbers")
void testSuccessfulPathResolution(final long toResolve, final Path expected) {
final Path actual = toTest.resolvePathToBlock(toResolve);
assertThat(actual).isNotNull().isEqualTo(expected);
assertThat(actual).isNotNull().isAbsolute().isEqualByComparingTo(expected);
}

/**
Expand Down

0 comments on commit b37fbc7

Please sign in to comment.