package io.wealthwizards.appsynctesting.extensions;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;

import java.util.Map;

import static org.junit.jupiter.api.Assertions.assertEquals;

@DisplayName("$extensions")
public class ExtensionsTest {
    @Nested
    @DisplayName(".evictFromApiCache")
    class EvictFromApiCache {
        @Disabled
        @Test
        @DisplayName("should expose eviction info")
        void shouldExposeEvictionInfo() {

        }

        @Test
        @DisplayName("should return 0")
        void shouldReturnNoEvictions() {
            var extensions = new Extensions();

            var actual = extensions.evictFromApiCache("Query", "adviserCases", Map.of("context.arguments.id", "ADVISER#adviserId"));
            var expected = Map.of(
                    "apiCacheEntriesDeleted", 0
            );

            assertEquals(expected, actual);
        }
    }
}
