Skip to content
Snippets Groups Projects
Commit e1071ef9 authored by Yerdana Jengiskhan's avatar Yerdana Jengiskhan
Browse files

Upload New File

parent 86f9d7fa
No related branches found
No related tags found
No related merge requests found
// 🧪 StateTests.java - Ensuring our state logic works flawlessly!
// Author: Yerdana Jengiskhan
// Reference: JUnit 5 official documentation
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
public class StateTests {
@Test
public void testStateInitialization() {
State state = new State();
assertEquals(0, state.getAttempts(), "Initial attempts should be 0!");
}
@Test
public void testIncrementAttempts() {
State state = new State();
state.incrementAttempts();
assertEquals(1, state.getAttempts(), "Attempts should increase correctly!");
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment