@@ -33,15 +33,12 @@ public class DetalleTest extends AbstractTest {
33
33
@ Test
34
34
public void testEnrichPrecioDeReferencia_precioConImpuestos_OperacionOnerosa () {
35
35
// Given
36
- Invoice input = Invoice
37
- .builder ()
38
- .detalle (
39
- DocumentoVentaDetalle
40
- .builder ()
41
- .precio (BigDecimal .TEN )
42
- .precioConImpuestos (false )
43
- .igvTipo (Catalog7 .GRAVADO_OPERACION_ONEROSA .getCode ())
44
- .build ()
36
+ Invoice input = Invoice .builder ()
37
+ .detalle (DocumentoVentaDetalle .builder ()
38
+ .precio (BigDecimal .TEN )
39
+ .precioConImpuestos (false )
40
+ .igvTipo (Catalog7 .GRAVADO_OPERACION_ONEROSA .getCode ())
41
+ .build ()
45
42
)
46
43
.build ();
47
44
@@ -60,15 +57,12 @@ public void testEnrichPrecioDeReferencia_precioConImpuestos_OperacionOnerosa() {
60
57
@ Test
61
58
public void testEnrichPrecioDeReferencia_precioConImpuestos_OperacionNoOnerosa () {
62
59
// Given
63
- Invoice input = Invoice
64
- .builder ()
65
- .detalle (
66
- DocumentoVentaDetalle
67
- .builder ()
68
- .precio (BigDecimal .TEN )
69
- .precioConImpuestos (false )
70
- .igvTipo (Catalog7 .GRAVADO_RETIRO .getCode ())
71
- .build ()
60
+ Invoice input = Invoice .builder ()
61
+ .detalle (DocumentoVentaDetalle .builder ()
62
+ .precio (BigDecimal .TEN )
63
+ .precioConImpuestos (false )
64
+ .igvTipo (Catalog7 .GRAVADO_RETIRO .getCode ())
65
+ .build ()
72
66
)
73
67
.build ();
74
68
@@ -87,15 +81,12 @@ public void testEnrichPrecioDeReferencia_precioConImpuestos_OperacionNoOnerosa()
87
81
@ Test
88
82
public void testEnrichPrecioDeReferencia_precioSinImpuestos_OperacionOnerosa () {
89
83
// Given
90
- Invoice input = Invoice
91
- .builder ()
92
- .detalle (
93
- DocumentoVentaDetalle
94
- .builder ()
95
- .precio (new BigDecimal ("11.80" ))
96
- .precioConImpuestos (true )
97
- .igvTipo (Catalog7 .GRAVADO_OPERACION_ONEROSA .getCode ())
98
- .build ()
84
+ Invoice input = Invoice .builder ()
85
+ .detalle (DocumentoVentaDetalle .builder ()
86
+ .precio (new BigDecimal ("11.80" ))
87
+ .precioConImpuestos (true )
88
+ .igvTipo (Catalog7 .GRAVADO_OPERACION_ONEROSA .getCode ())
89
+ .build ()
99
90
)
100
91
.build ();
101
92
@@ -114,15 +105,12 @@ public void testEnrichPrecioDeReferencia_precioSinImpuestos_OperacionOnerosa() {
114
105
@ Test
115
106
public void testEnrichPrecioDeReferencia_precioSinImpuestos_OperacionNoOnerosa () {
116
107
// Given
117
- Invoice input = Invoice
118
- .builder ()
119
- .detalle (
120
- DocumentoVentaDetalle
121
- .builder ()
122
- .precio (new BigDecimal ("11.80" ))
123
- .precioConImpuestos (true )
124
- .igvTipo (Catalog7 .GRAVADO_RETIRO .getCode ())
125
- .build ()
108
+ Invoice input = Invoice .builder ()
109
+ .detalle (DocumentoVentaDetalle .builder ()
110
+ .precio (new BigDecimal ("11.80" ))
111
+ .precioConImpuestos (true )
112
+ .igvTipo (Catalog7 .GRAVADO_RETIRO .getCode ())
113
+ .build ()
126
114
)
127
115
.build ();
128
116
@@ -158,8 +146,7 @@ public void testEnrichIcb() {
158
146
@ Test
159
147
public void testDontEnrichIcb () {
160
148
// Given
161
- Invoice input = Invoice
162
- .builder ()
149
+ Invoice input = Invoice .builder ()
163
150
.detalle (DocumentoVentaDetalle .builder ().icb (BigDecimal .TEN ).icbAplica (false ).build ())
164
151
.build ();
165
152
@@ -178,14 +165,11 @@ public void testDontEnrichIcb() {
178
165
@ Test
179
166
public void testEnrichIcbAplica () {
180
167
// Given
181
- Invoice input = Invoice
182
- .builder ()
183
- .detalle (
184
- DocumentoVentaDetalle
185
- .builder ()
186
- .icb (BigDecimal .TEN )
187
- .icbAplica (false ) // this should be corrected
188
- .build ()
168
+ Invoice input = Invoice .builder ()
169
+ .detalle (DocumentoVentaDetalle .builder ()
170
+ .icb (BigDecimal .TEN )
171
+ .icbAplica (false ) // this should be corrected
172
+ .build ()
189
173
)
190
174
.build ();
191
175
@@ -204,15 +188,12 @@ public void testEnrichIcbAplica() {
204
188
@ Test
205
189
public void testEnrichBaseImponible_whenPrecioConImpuestos () {
206
190
// Given
207
- Invoice input = Invoice
208
- .builder ()
209
- .detalle (
210
- DocumentoVentaDetalle
211
- .builder ()
212
- .cantidad (new BigDecimal (2 ))
213
- .precio (BigDecimal .TEN )
214
- .precioConImpuestos (false )
215
- .build ()
191
+ Invoice input = Invoice .builder ()
192
+ .detalle (DocumentoVentaDetalle .builder ()
193
+ .cantidad (new BigDecimal (2 ))
194
+ .precio (BigDecimal .TEN )
195
+ .precioConImpuestos (false )
196
+ .build ()
216
197
)
217
198
.build ();
218
199
@@ -231,15 +212,12 @@ public void testEnrichBaseImponible_whenPrecioConImpuestos() {
231
212
@ Test
232
213
public void testEnrichBaseImponible_whenPrecioSinImpuestos () {
233
214
// Given
234
- Invoice input = Invoice
235
- .builder ()
236
- .detalle (
237
- DocumentoVentaDetalle
238
- .builder ()
239
- .cantidad (new BigDecimal (2 ))
240
- .precio (new BigDecimal ("11.8" ))
241
- .precioConImpuestos (true )
242
- .build ()
215
+ Invoice input = Invoice .builder ()
216
+ .detalle (DocumentoVentaDetalle .builder ()
217
+ .cantidad (new BigDecimal (2 ))
218
+ .precio (new BigDecimal ("11.8" ))
219
+ .precioConImpuestos (true )
220
+ .build ()
243
221
)
244
222
.build ();
245
223
@@ -258,16 +236,13 @@ public void testEnrichBaseImponible_whenPrecioSinImpuestos() {
258
236
@ Test
259
237
public void testDontEnrichBaseImponible () {
260
238
// Given
261
- Invoice input = Invoice
262
- .builder ()
263
- .detalle (
264
- DocumentoVentaDetalle
265
- .builder ()
266
- .cantidad (new BigDecimal (2 ))
267
- .precio (new BigDecimal ("10" ))
268
- .precioConImpuestos (false )
269
- .igvBaseImponible (new BigDecimal (999 )) // This user defined value should not be altered
270
- .build ()
239
+ Invoice input = Invoice .builder ()
240
+ .detalle (DocumentoVentaDetalle .builder ()
241
+ .cantidad (new BigDecimal (2 ))
242
+ .precio (new BigDecimal ("10" ))
243
+ .precioConImpuestos (false )
244
+ .igvBaseImponible (new BigDecimal (999 )) // This user defined value should not be altered
245
+ .build ()
271
246
)
272
247
.build ();
273
248
@@ -286,8 +261,7 @@ public void testDontEnrichBaseImponible() {
286
261
@ Test
287
262
public void testEnrichIgv () {
288
263
// Given
289
- Invoice input = Invoice
290
- .builder ()
264
+ Invoice input = Invoice .builder ()
291
265
.tasaIgv (new BigDecimal ("0.18" ))
292
266
.detalle (DocumentoVentaDetalle .builder ().igvBaseImponible (new BigDecimal ("10" )).build ())
293
267
.build ();
@@ -307,15 +281,12 @@ public void testEnrichIgv() {
307
281
@ Test
308
282
public void testDontEnrichIgv () {
309
283
// Given
310
- Invoice input = Invoice
311
- .builder ()
284
+ Invoice input = Invoice .builder ()
312
285
.tasaIgv (new BigDecimal ("0.18" ))
313
- .detalle (
314
- DocumentoVentaDetalle
315
- .builder ()
316
- .igvBaseImponible (new BigDecimal ("10" ))
317
- .igv (new BigDecimal ("999" )) // Dont change user defined value
318
- .build ()
286
+ .detalle (DocumentoVentaDetalle .builder ()
287
+ .igvBaseImponible (new BigDecimal ("10" ))
288
+ .igv (new BigDecimal ("999" )) // Dont change user defined value
289
+ .build ()
319
290
)
320
291
.build ();
321
292
@@ -334,8 +305,7 @@ public void testDontEnrichIgv() {
334
305
@ Test
335
306
public void testEnrichTotalImpuestos () {
336
307
// Given
337
- Invoice input = Invoice
338
- .builder ()
308
+ Invoice input = Invoice .builder ()
339
309
.detalle (DocumentoVentaDetalle .builder ().igv (new BigDecimal ("10" )).icb (new BigDecimal ("2" )).build ())
340
310
.build ();
341
311
@@ -354,15 +324,12 @@ public void testEnrichTotalImpuestos() {
354
324
@ Test
355
325
public void testDontEnrichTotalImpuestos () {
356
326
// Given
357
- Invoice input = Invoice
358
- .builder ()
359
- .detalle (
360
- DocumentoVentaDetalle
361
- .builder ()
362
- .igv (new BigDecimal ("10" ))
363
- .icb (new BigDecimal ("2" ))
364
- .totalImpuestos (new BigDecimal ("999" )) // Dont change user defined value
365
- .build ()
327
+ Invoice input = Invoice .builder ()
328
+ .detalle (DocumentoVentaDetalle .builder ()
329
+ .igv (new BigDecimal ("10" ))
330
+ .icb (new BigDecimal ("2" ))
331
+ .totalImpuestos (new BigDecimal ("999" )) // Dont change user defined value
332
+ .build ()
366
333
)
367
334
.build ();
368
335
0 commit comments