Skip to content

Commit

Permalink
Add test for record class
Browse files Browse the repository at this point in the history
  • Loading branch information
dodie committed Sep 27, 2021
1 parent 6125b23 commit 714d516
Showing 1 changed file with 24 additions and 0 deletions.
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"));
}

}

0 comments on commit 714d516

Please sign in to comment.