Skip to content

Commit 515daf7

Browse files
SP-737 Type Review: Java
1 parent a0f60b6 commit 515daf7

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Copyright (c) 2019 BitPay.
3+
* All rights reserved.
4+
*/
5+
6+
package com.bitpay.sdk.model.invoice;
7+
8+
import java.time.ZonedDateTime;
9+
import org.junit.jupiter.api.Assertions;
10+
import org.junit.jupiter.api.Test;
11+
12+
public class InvoiceRefundAddressesTest {
13+
14+
@Test
15+
public void it_should_manipulate_type() {
16+
String expected = "exampleType";
17+
InvoiceRefundAddresses testedClass = this.getTestedClass();
18+
19+
testedClass.setType(expected);
20+
Assertions.assertSame(expected, testedClass.getType());
21+
}
22+
23+
@Test
24+
public void it_should_manipulate_date() {
25+
ZonedDateTime expected = ZonedDateTime.now();
26+
InvoiceRefundAddresses testedClass = this.getTestedClass();
27+
28+
testedClass.setDate(expected);
29+
Assertions.assertSame(expected, testedClass.getDate());
30+
}
31+
32+
@Test
33+
public void it_should_manipulate_tag() {
34+
Integer expected = 123;
35+
InvoiceRefundAddresses testedClass = this.getTestedClass();
36+
37+
testedClass.setTag(expected);
38+
Assertions.assertSame(expected, testedClass.getTag());
39+
}
40+
41+
@Test
42+
public void it_should_manipulate_email() {
43+
String expected = "[email protected]";
44+
InvoiceRefundAddresses testedClass = this.getTestedClass();
45+
46+
testedClass.setEmail(expected);
47+
Assertions.assertSame(expected, testedClass.getEmail());
48+
}
49+
50+
private InvoiceRefundAddresses getTestedClass() {
51+
return new InvoiceRefundAddresses();
52+
}
53+
}

0 commit comments

Comments
 (0)