Skip to content

Commit

Permalink
Remove tests for autogenerated record toString methods
Browse files Browse the repository at this point in the history
  • Loading branch information
steinarb committed May 5, 2024
1 parent dacca76 commit 0e904e3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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[");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,4 @@ void testProperties() {
assertEquals("Juliet Deere", user.fullname());
}

@Test
void testToString() {
var user = User.with().userId(1).username("jad").email("[email protected]").firstname("Jane").lastname("Doe").build();
assertEquals("User[userId=1, username=jad, [email protected], 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());
}

}

0 comments on commit 0e904e3

Please sign in to comment.