From 0e904e3da12f6369632faa25617562ccb0ae1e1d Mon Sep 17 00:00:00 2001 From: Steinar Bang Date: Sun, 5 May 2024 12:19:05 +0200 Subject: [PATCH] Remove tests for autogenerated record toString methods --- .../test/java/no/priv/bang/ukelonn/beans/AccountTest.java | 8 -------- .../no/priv/bang/ukelonn/beans/TransactionTypeTest.java | 8 -------- .../test/java/no/priv/bang/ukelonn/beans/UserTest.java | 8 -------- 3 files changed, 24 deletions(-) diff --git a/ukelonn.services/src/test/java/no/priv/bang/ukelonn/beans/AccountTest.java b/ukelonn.services/src/test/java/no/priv/bang/ukelonn/beans/AccountTest.java index 7333e1ca..2179af62 100644 --- a/ukelonn.services/src/test/java/no/priv/bang/ukelonn/beans/AccountTest.java +++ b/ukelonn.services/src/test/java/no/priv/bang/ukelonn/beans/AccountTest.java @@ -74,12 +74,4 @@ void testFullNameWhenNoFirstName() { assertEquals("jad", account.getFullName()); } - @Test - void testToString() { - var account = Account.with().accountid(1).username("jad").firstName("Jane").lastName("Doe").balance(1).build(); - assertEquals("Account[accountId=1, username=jad, firstName=Jane, lastName=Doe, balance=1.0]", account.toString()); - var accountWithNullStrings = Account.with().accountid(1).build(); - assertEquals("Account[accountId=1, username=null, firstName=null, lastName=null, balance=0.0]", accountWithNullStrings.toString()); - } - } diff --git a/ukelonn.services/src/test/java/no/priv/bang/ukelonn/beans/TransactionTypeTest.java b/ukelonn.services/src/test/java/no/priv/bang/ukelonn/beans/TransactionTypeTest.java index 557736f6..f9d8229d 100644 --- a/ukelonn.services/src/test/java/no/priv/bang/ukelonn/beans/TransactionTypeTest.java +++ b/ukelonn.services/src/test/java/no/priv/bang/ukelonn/beans/TransactionTypeTest.java @@ -16,8 +16,6 @@ package no.priv.bang.ukelonn.beans; import static org.junit.jupiter.api.Assertions.*; -import static org.assertj.core.api.Assertions.assertThat; - import org.junit.jupiter.api.Test; class TransactionTypeTest { @@ -47,10 +45,4 @@ void testConstructorWithArguments() { assertFalse(bean.transactionIsWagePayment()); } - @Test - void testToString() { - var bean = TransactionType.with().id(1).transactionTypeName("Vaske").transactionAmount(45.0).transactionIsWork(true).build(); - assertThat(bean.toString()).startsWith("TransactionType["); - } - } diff --git a/ukelonn.services/src/test/java/no/priv/bang/ukelonn/beans/UserTest.java b/ukelonn.services/src/test/java/no/priv/bang/ukelonn/beans/UserTest.java index 75e1f9e6..dfa852e0 100644 --- a/ukelonn.services/src/test/java/no/priv/bang/ukelonn/beans/UserTest.java +++ b/ukelonn.services/src/test/java/no/priv/bang/ukelonn/beans/UserTest.java @@ -69,12 +69,4 @@ void testProperties() { assertEquals("Juliet Deere", user.fullname()); } - @Test - void testToString() { - var user = User.with().userId(1).username("jad").email("jane21@gmail.com").firstname("Jane").lastname("Doe").build(); - assertEquals("User[userId=1, username=jad, email=jane21@gmail.com, firstname=Jane, lastname=Doe]", user.toString()); - var userWithNullStrings = User.with().userId(1).username(null).email(null).firstname(null).lastname(null).build(); - assertEquals("User[userId=1, username=null, email=null, firstname=null, lastname=null]", userWithNullStrings.toString()); - } - }