Skip to content

Commit bf18891

Browse files
SP-752 Code Examples: Java
1 parent 5268ab3 commit bf18891

File tree

1 file changed

+79
-78
lines changed

1 file changed

+79
-78
lines changed

src/test/java/com/bitpay/sdk/model/settlement/SettlementTest.java

Lines changed: 79 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
package com.bitpay.sdk.model.settlement;
66

7+
import java.time.ZonedDateTime;
78
import java.util.Collections;
89
import java.util.List;
910
import org.junit.jupiter.api.Assertions;
@@ -76,84 +77,84 @@ public void it_should_change_status() {
7677
// then
7778
Assertions.assertEquals(expected, testedClass.getStatus());
7879
}
79-
//
80-
// @Test
81-
// public void it_should_change_dateCreated() {
82-
// // given
83-
// Long expected = 12L;
84-
// Settlement testedClass = this.getTestedClass();
85-
//
86-
// // when
87-
// testedClass.setDateCreated(expected);
88-
//
89-
// // then
90-
// Assertions.assertEquals(expected, testedClass.getDateCreated());
91-
// }
92-
//
93-
// @Test
94-
// public void it_should_change_dateExecuted() {
95-
// // given
96-
// Long expected = 12L;
97-
// Settlement testedClass = this.getTestedClass();
98-
//
99-
// // when
100-
// testedClass.setDateExecuted(expected);
101-
//
102-
// // then
103-
// Assertions.assertEquals(expected, testedClass.getDateExecuted());
104-
// }
105-
//
106-
// @Test
107-
// public void it_should_change_dateCompleted() {
108-
// // given
109-
// Long expected = 12L;
110-
// Settlement testedClass = this.getTestedClass();
111-
//
112-
// // when
113-
// testedClass.setDateCompleted(expected);
114-
//
115-
// // then
116-
// Assertions.assertEquals(expected, testedClass.getDateCompleted());
117-
// }
118-
//
119-
// @Test
120-
// public void it_should_change_openingDate() {
121-
// // given
122-
// Long expected = 12L;
123-
// Settlement testedClass = this.getTestedClass();
124-
//
125-
// // when
126-
// testedClass.setOpeningDate(expected);
127-
//
128-
// // then
129-
// Assertions.assertEquals(expected, testedClass.getOpeningDate());
130-
// }
131-
//
132-
// @Test
133-
// public void it_should_change_closingDate() {
134-
// // given
135-
// Long expected = 12L;
136-
// Settlement testedClass = this.getTestedClass();
137-
//
138-
// // when
139-
// testedClass.setClosingDate(expected);
140-
//
141-
// // then
142-
// Assertions.assertEquals(expected, testedClass.getClosingDate());
143-
// }
144-
//
145-
// @Test
146-
// public void it_should_change_openingBalance() {
147-
// // given
148-
// Float expected = 12.34F;
149-
// Settlement testedClass = this.getTestedClass();
150-
//
151-
// // when
152-
// testedClass.setOpeningBalance(expected);
153-
//
154-
// // then
155-
// Assertions.assertEquals(expected, testedClass.getOpeningBalance());
156-
// }
80+
81+
@Test
82+
public void it_should_change_dateCreated() {
83+
// given
84+
ZonedDateTime expected = ZonedDateTime.now();
85+
Settlement testedClass = this.getTestedClass();
86+
87+
// when
88+
testedClass.setDateCreated(expected);
89+
90+
// then
91+
Assertions.assertEquals(expected, testedClass.getDateCreated());
92+
}
93+
94+
@Test
95+
public void it_should_change_dateExecuted() {
96+
// given
97+
ZonedDateTime expected = ZonedDateTime.now();
98+
Settlement testedClass = this.getTestedClass();
99+
100+
// when
101+
testedClass.setDateExecuted(expected);
102+
103+
// then
104+
Assertions.assertEquals(expected, testedClass.getDateExecuted());
105+
}
106+
107+
@Test
108+
public void it_should_change_dateCompleted() {
109+
// given
110+
ZonedDateTime expected = ZonedDateTime.now();
111+
Settlement testedClass = this.getTestedClass();
112+
113+
// when
114+
testedClass.setDateCompleted(expected);
115+
116+
// then
117+
Assertions.assertEquals(expected, testedClass.getDateCompleted());
118+
}
119+
120+
@Test
121+
public void it_should_change_openingDate() {
122+
// given
123+
ZonedDateTime expected = ZonedDateTime.now();
124+
Settlement testedClass = this.getTestedClass();
125+
126+
// when
127+
testedClass.setOpeningDate(expected);
128+
129+
// then
130+
Assertions.assertEquals(expected, testedClass.getOpeningDate());
131+
}
132+
133+
@Test
134+
public void it_should_change_closingDate() {
135+
// given
136+
ZonedDateTime expected = ZonedDateTime.now();
137+
Settlement testedClass = this.getTestedClass();
138+
139+
// when
140+
testedClass.setClosingDate(expected);
141+
142+
// then
143+
Assertions.assertEquals(expected, testedClass.getClosingDate());
144+
}
145+
146+
@Test
147+
public void it_should_change_openingBalance() {
148+
// given
149+
Float expected = 12.34F;
150+
Settlement testedClass = this.getTestedClass();
151+
152+
// when
153+
testedClass.setOpeningBalance(expected);
154+
155+
// then
156+
Assertions.assertEquals(expected, testedClass.getOpeningBalance());
157+
}
157158

158159
@Test
159160
public void it_should_change_ledgerEntriesSum() {

0 commit comments

Comments
 (0)