Ver código fonte

BMD Cache Class

Andrew Grant 3 meses atrás
pai
commit
4c3288ed1d

+ 19 - 0
src/main/java/scot/carricksoftware/grants/cache/BMDCache.java

@@ -0,0 +1,19 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grants.cache;
+
+import scot.carricksoftware.grants.domains.people.Person;
+
+import java.util.List;
+
+public interface BMDCache {
+
+    @SuppressWarnings("unused")
+    List<Person> getPeople();
+    @SuppressWarnings("unused")
+    void invalidatePeople();
+
+}

+ 23 - 0
src/main/java/scot/carricksoftware/grants/cache/BMDCacheImpl.java

@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grants.cache;
+
+import scot.carricksoftware.grants.domains.people.Person;
+
+import java.util.List;
+
+public class BMDCacheImpl implements BMDCache {
+
+    @Override
+    public List<Person> getPeople() {
+        return List.of();
+    }
+
+    @Override
+    public void invalidatePeople() {
+        throw new UnsupportedOperationException("BMDCache::invalidatePeople Not supported yet.");
+    }
+}

+ 27 - 0
src/test/java/scot/carricksoftware/grants/cache/BMDCacheTest.java

@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
+ *
+ */
+
+package scot.carricksoftware.grants.cache;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+
+import static org.junit.jupiter.api.Assertions.*;
+
+public class BMDCacheTest {
+
+    private BMDCache cache;
+
+    @BeforeEach
+    void setUp() {
+        cache = new BMDCacheImpl();
+    }
+
+    @Test
+    void constructorTest() {
+        assertNotNull(cache);
+    }
+}