aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThorsten Ortlepp <post@ortlepp.eu>2024-04-23 21:15:19 +0200
committerThorsten Ortlepp <post@ortlepp.eu>2024-04-23 21:15:19 +0200
commitb6bdf180c777566bbe908303774e53c7d4e099c4 (patch)
tree320145da6c0d443c5140e68ef6289e8d2bd13853 /src
downloadnotification-sender-b6bdf180c777566bbe908303774e53c7d4e099c4.zip
project initialization
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/ortlepp/notificationsender/NotificationHandler.java12
-rw-r--r--src/test/java/eu/ortlepp/notificationsender/NotificationHandlerTest.java16
2 files changed, 28 insertions, 0 deletions
diff --git a/src/main/java/eu/ortlepp/notificationsender/NotificationHandler.java b/src/main/java/eu/ortlepp/notificationsender/NotificationHandler.java
new file mode 100644
index 0000000..43e1aa9
--- /dev/null
+++ b/src/main/java/eu/ortlepp/notificationsender/NotificationHandler.java
@@ -0,0 +1,12 @@
+package eu.ortlepp.notificationsender;
+
+import com.amazonaws.services.lambda.runtime.Context;
+import com.amazonaws.services.lambda.runtime.RequestHandler;
+
+public class NotificationHandler implements RequestHandler<String, String> {
+
+ public String handleRequest(String event, Context context) {
+ return event.toLowerCase();
+ }
+
+} \ No newline at end of file
diff --git a/src/test/java/eu/ortlepp/notificationsender/NotificationHandlerTest.java b/src/test/java/eu/ortlepp/notificationsender/NotificationHandlerTest.java
new file mode 100644
index 0000000..efe768f
--- /dev/null
+++ b/src/test/java/eu/ortlepp/notificationsender/NotificationHandlerTest.java
@@ -0,0 +1,16 @@
+package eu.ortlepp.notificationsender;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import org.junit.jupiter.api.Test;
+
+public class NotificationHandlerTest {
+
+ @Test
+ void testHandleRequest() {
+ String value = "Test";
+ NotificationHandler handler = new NotificationHandler();
+ assertEquals(value.toLowerCase(), handler.handleRequest(value, null));
+ }
+
+}