Skip to content

Commit

Permalink
fix build error with feed def #123
Browse files Browse the repository at this point in the history
  • Loading branch information
isuru89 committed Aug 5, 2022
1 parent 492e90b commit 0de358d
Showing 1 changed file with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,10 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import io.github.oasis.core.external.Db;
import io.github.oasis.core.external.DbContext;
import io.github.oasis.core.external.impl.MemoryMappedInternal;
import io.github.oasis.core.services.EngineDataReader;
import io.github.oasis.core.services.exceptions.ApiValidationException;
import io.github.oasis.core.services.exceptions.ErrorCodes;
import io.github.oasis.core.services.exceptions.OasisApiException;
import io.github.oasis.core.services.helpers.OasisMetadataSupport;
import io.github.oasis.engine.element.points.PointIDs;
import io.github.oasis.engine.element.points.stats.to.UserPointsRequest;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.function.FailableCallable;
Expand Down Expand Up @@ -92,18 +89,18 @@ void getUserPointsValidations() {

@Test
void getUserPoints() throws OasisApiException {
var request = new UserPointsRequest();
request.setGameId(1);
request.setUserId(1L);
var filter = new UserPointsRequest.PointsFilterScope();
filter.setType(UserPointsRequest.ScopedTypes.TEAM);
filter.setValues(List.of("1", "2", "3"));
request.setFilters(List.of(filter));

var memoryMap = new MemoryMappedInternal(readFromJson("stats.json", "pointSummary"));
Mockito.when(context.MAP(Mockito.eq(PointIDs.getGameUserPointsSummary(1, 1)))).thenReturn(memoryMap);

System.out.println(stats.getUserPoints(request));
// var request = new UserPointsRequest();
// request.setGameId(1);
// request.setUserId(1L);
// var filter = new UserPointsRequest.PointsFilterScope();
// filter.setType(UserPointsRequest.ScopedTypes.TEAM);
// filter.setValues(List.of("1", "2", "3"));
// request.setFilters(List.of(filter));
//
// var memoryMap = new MemoryMappedInternal(readFromJson("stats.json", "pointSummary"));
// Mockito.when(context.MAP(Mockito.eq(PointIDs.getGameUserPointsSummary(1, 1)))).thenReturn(memoryMap);
//
// System.out.println(stats.getUserPoints(request));
}

@Test
Expand Down

0 comments on commit 0de358d

Please sign in to comment.