-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
scott-tests/junit5-tests/src/test/java/hu/advancedweb/scott/Java16Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package hu.advancedweb.scott; | ||
|
||
import static hu.advancedweb.scott.helper.TestHelper.wrapped; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import hu.advancedweb.scott.helper.TestHelper; | ||
import org.junit.jupiter.api.Test; | ||
|
||
|
||
public class Java16Test { | ||
|
||
@Test | ||
public void testWithRecord() { | ||
|
||
record X(String y) { } | ||
|
||
var x = new X("hello"); | ||
|
||
var y = x.y(); | ||
|
||
assertEquals(wrapped("hello"), TestHelper.getLastRecordedStateForVariable("y")); | ||
} | ||
|
||
} |