Skip to content

Commit

Permalink
Add MVC test for ClockView
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
LiveNathan committed Aug 16, 2024
1 parent b4daab4 commit a648da3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/test/java/dev/nathanlively/views/clock/ClockMvcTest.java
Original file line number Diff line number Diff line change
@@ -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();
}
}

0 comments on commit a648da3

Please sign in to comment.