From a648da3b2685fff4f94d1b751dc7170ea1c271a9 Mon Sep 17 00:00:00 2001 From: Nathan Lively <60303904+LiveNathan@users.noreply.github.com> Date: Thu, 15 Aug 2024 21:55:07 -0500 Subject: [PATCH] Add MVC test for ClockView Introduced ClockMvcTest to verify the functionality of ClockView within the MVC context. This test ensures that a GET request can successfully navigate to the ClockView, confirming its presence and proper initialization. --- .../views/clock/ClockMvcTest.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/test/java/dev/nathanlively/views/clock/ClockMvcTest.java diff --git a/src/test/java/dev/nathanlively/views/clock/ClockMvcTest.java b/src/test/java/dev/nathanlively/views/clock/ClockMvcTest.java new file mode 100644 index 0000000..307c904 --- /dev/null +++ b/src/test/java/dev/nathanlively/views/clock/ClockMvcTest.java @@ -0,0 +1,20 @@ +package dev.nathanlively.views.clock; + +import com.vaadin.testbench.unit.UIUnitTest; +import com.vaadin.testbench.unit.ViewPackages; +import org.junit.jupiter.api.Tag; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +@ViewPackages(classes = {ClockView.class}) +@Tag("mvc") +class ClockMvcTest extends UIUnitTest { + + @Test + public void getRequestToIndex() throws Exception { + ClockView view = navigate(ClockView.class); + + assertThat(view).isNotNull(); + } +} \ No newline at end of file