Skip to content

Commit

Permalink
test: remove the need of Optional from the rank attribute at JHipster…
Browse files Browse the repository at this point in the history
…ModuleResource.java
  • Loading branch information
renanfranca committed Jan 22, 2025
1 parent ad03621 commit e79ebdc
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import static tech.jhipster.lite.module.domain.resource.JHipsterModulesResourceFixture.*;

import java.util.List;
import java.util.Optional;
import org.junit.jupiter.api.Test;
import tech.jhipster.lite.UnitTest;
import tech.jhipster.lite.module.domain.JHipsterModuleSlug;
Expand Down Expand Up @@ -52,13 +51,13 @@ void shouldHaveMeaningfulToString() {
void shouldBuildWithRankedResources() {
var resource = defaultModuleResourceBuilder().rank("S").build();

assertThat(resource.rank()).isEqualTo(Optional.of(new JHipsterModuleRank("S")));
assertThat(resource.rank()).isEqualTo(new JHipsterModuleRank("S"));
}

@Test
void shouldBuildWithDefaultRankedResources() {
var resource = defaultModuleResourceBuilder().build();

assertThat(resource.rank()).isEqualTo(Optional.of(new JHipsterModuleRank("D")));
assertThat(resource.rank()).isEqualTo(new JHipsterModuleRank("D"));
}
}

0 comments on commit e79ebdc

Please sign in to comment.