@@ -33,15 +33,12 @@ public class DetalleTest extends AbstractTest {
3333 @ Test
3434 public void testEnrichPrecioDeReferencia_precioConImpuestos_OperacionOnerosa () {
3535 // 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 ()
4542 )
4643 .build ();
4744
@@ -60,15 +57,12 @@ public void testEnrichPrecioDeReferencia_precioConImpuestos_OperacionOnerosa() {
6057 @ Test
6158 public void testEnrichPrecioDeReferencia_precioConImpuestos_OperacionNoOnerosa () {
6259 // 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 ()
7266 )
7367 .build ();
7468
@@ -87,15 +81,12 @@ public void testEnrichPrecioDeReferencia_precioConImpuestos_OperacionNoOnerosa()
8781 @ Test
8882 public void testEnrichPrecioDeReferencia_precioSinImpuestos_OperacionOnerosa () {
8983 // 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 ()
9990 )
10091 .build ();
10192
@@ -114,15 +105,12 @@ public void testEnrichPrecioDeReferencia_precioSinImpuestos_OperacionOnerosa() {
114105 @ Test
115106 public void testEnrichPrecioDeReferencia_precioSinImpuestos_OperacionNoOnerosa () {
116107 // 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 ()
126114 )
127115 .build ();
128116
@@ -158,8 +146,7 @@ public void testEnrichIcb() {
158146 @ Test
159147 public void testDontEnrichIcb () {
160148 // Given
161- Invoice input = Invoice
162- .builder ()
149+ Invoice input = Invoice .builder ()
163150 .detalle (DocumentoVentaDetalle .builder ().icb (BigDecimal .TEN ).icbAplica (false ).build ())
164151 .build ();
165152
@@ -178,14 +165,11 @@ public void testDontEnrichIcb() {
178165 @ Test
179166 public void testEnrichIcbAplica () {
180167 // 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 ()
189173 )
190174 .build ();
191175
@@ -204,15 +188,12 @@ public void testEnrichIcbAplica() {
204188 @ Test
205189 public void testEnrichBaseImponible_whenPrecioConImpuestos () {
206190 // 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 ()
216197 )
217198 .build ();
218199
@@ -231,15 +212,12 @@ public void testEnrichBaseImponible_whenPrecioConImpuestos() {
231212 @ Test
232213 public void testEnrichBaseImponible_whenPrecioSinImpuestos () {
233214 // 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 ()
243221 )
244222 .build ();
245223
@@ -258,16 +236,13 @@ public void testEnrichBaseImponible_whenPrecioSinImpuestos() {
258236 @ Test
259237 public void testDontEnrichBaseImponible () {
260238 // 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 ()
271246 )
272247 .build ();
273248
@@ -286,8 +261,7 @@ public void testDontEnrichBaseImponible() {
286261 @ Test
287262 public void testEnrichIgv () {
288263 // Given
289- Invoice input = Invoice
290- .builder ()
264+ Invoice input = Invoice .builder ()
291265 .tasaIgv (new BigDecimal ("0.18" ))
292266 .detalle (DocumentoVentaDetalle .builder ().igvBaseImponible (new BigDecimal ("10" )).build ())
293267 .build ();
@@ -307,15 +281,12 @@ public void testEnrichIgv() {
307281 @ Test
308282 public void testDontEnrichIgv () {
309283 // Given
310- Invoice input = Invoice
311- .builder ()
284+ Invoice input = Invoice .builder ()
312285 .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 ()
319290 )
320291 .build ();
321292
@@ -334,8 +305,7 @@ public void testDontEnrichIgv() {
334305 @ Test
335306 public void testEnrichTotalImpuestos () {
336307 // Given
337- Invoice input = Invoice
338- .builder ()
308+ Invoice input = Invoice .builder ()
339309 .detalle (DocumentoVentaDetalle .builder ().igv (new BigDecimal ("10" )).icb (new BigDecimal ("2" )).build ())
340310 .build ();
341311
@@ -354,15 +324,12 @@ public void testEnrichTotalImpuestos() {
354324 @ Test
355325 public void testDontEnrichTotalImpuestos () {
356326 // 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 ()
366333 )
367334 .build ();
368335
0 commit comments