Skip to content

Commit

Permalink
Read allowed featured mods dynamically (tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
micheljung committed Aug 14, 2017
1 parent f6a5012 commit e38cda3
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.faforever.api.config.FafApiProperties;
import com.faforever.api.config.FafApiProperties.Deployment;
import com.faforever.api.config.FafApiProperties.Deployment.DeploymentConfiguration;
import com.faforever.api.data.domain.FeaturedMod;
import com.faforever.api.deployment.git.GitWrapper;
import com.faforever.api.featuredmods.FeaturedModFile;
import com.faforever.api.featuredmods.FeaturedModService;
Expand Down Expand Up @@ -84,6 +85,9 @@ public void testRunNoFileIds() throws Exception {
return null;
}).when(gitWrapper).checkoutRef(any(), any());

when(featuredModService.getFeaturedMods()).thenReturn(Collections.singletonList(
new FeaturedMod().setTechnicalName("faf")
));
when(featuredModService.getFileIds("faf")).thenReturn(Collections.emptyMap());

Path dummyExe = repositoriesFolder.getRoot().toPath().resolve("TemplateForgedAlliance.exe");
Expand Down Expand Up @@ -118,6 +122,9 @@ public void testRun() throws Exception {
return null;
}).when(gitWrapper).checkoutRef(any(), any());

when(featuredModService.getFeaturedMods()).thenReturn(Collections.singletonList(
new FeaturedMod().setTechnicalName("faf")
));
when(featuredModService.getFileIds("faf")).thenReturn(ImmutableMap.of(
"ForgedAlliance.exe", (short) 1,
"someDir.nx3", (short) 2
Expand Down

0 comments on commit e38cda3

Please sign in to comment.