Skip to content

Commit

Permalink
Unit test fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdimi98 committed Mar 17, 2024
1 parent a9698c9 commit 85e863f
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions src/test/java/com/telerikacademy/web/virtualwallet/Helpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public static User createMockUser2() {
mockUser.setUserCards(new HashSet<>());
mockUser.setWallets(new HashSet<>());
mockUser.getWallets().add(new Wallet());
mockUser.getWallet().setId(2);
mockUser.setProfilePhoto(new ProfilePhoto());
return mockUser;
}
Expand Down Expand Up @@ -71,28 +72,16 @@ public static ProfilePhoto createMockProfilePhoto() {
return profilePhoto;
}

public static Transaction createMockTransactionOutgoing(){
public static Transaction createMockTransaction(){
var transaction = new Transaction();
User sender = createMockUser();
User receiver = createMockUser2();
transaction.setId(1);
transaction.setAmount(1000);
transaction.setSender(sender);
transaction.setReceiver(receiver);
transaction.setDate(LocalDateTime.now());

return transaction;
}

public static Transaction createMockTransactionIngoing(){
var transaction = new Transaction();
User sender = createMockUser();
User receiver = createMockUser2();
transaction.setId(2);
transaction.setAmount(1000);
transaction.setAmount(500);
transaction.setSender(sender);
transaction.setReceiver(receiver);
transaction.setDate(LocalDateTime.now());
transaction.setExpirationDate(LocalDateTime.now().plusDays(2));

return transaction;
}
Expand Down

0 comments on commit 85e863f

Please sign in to comment.