Skip to content

Commit

Permalink
NT 2024.01 - adicionado CRT MEI e removido obrigado de origem em algu…
Browse files Browse the repository at this point in the history
…ns CSOSN para contemplar schema
  • Loading branch information
giovaneboeing committed Aug 21, 2024
1 parent d27c25d commit 673b6ae
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ public enum NFRegimeTributario {

SIMPLES_NACIONAL("1", "Simples nacional"),
SIMPLES_NACIONAL_EXCESSO_RECEITA("2", "Simples nacional com excesso de sublimite da receita bruta"),
NORMAL("3", "Regime normal");
NORMAL("3", "Regime normal"),
MEI("4", "Simples Nacional - Microempreendedor Individual - MEI");

private final String codigo;
private final String descricao;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
public class NFNotaInfoItemImpostoICMSSN102 extends DFBase {
private static final long serialVersionUID = 8991323254446222797L;

@Element(name = "orig")
@Element(name = "orig", required = false)
private NFOrigem origem;

@Element(name = "CSOSN")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public class NFNotaInfoItemImpostoICMSSN900 extends DFBase {
private static final long serialVersionUID = 4771007345613617306L;

@Element(name = "orig")
@Element(name = "orig", required = false)
private NFOrigem origem;

@Element(name = "CSOSN")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,27 @@ public void deveRepresentarOCodigoCorretamente() {
Assert.assertEquals("1", NFRegimeTributario.SIMPLES_NACIONAL.getCodigo());
Assert.assertEquals("2", NFRegimeTributario.SIMPLES_NACIONAL_EXCESSO_RECEITA.getCodigo());
Assert.assertEquals("3", NFRegimeTributario.NORMAL.getCodigo());
Assert.assertEquals("4", NFRegimeTributario.MEI.getCodigo());
}

@Test
public void deveObterPeloCodigoCorretamente() {
Assert.assertEquals(NFRegimeTributario.SIMPLES_NACIONAL, NFRegimeTributario.valueOfCodigo("1"));
Assert.assertEquals(NFRegimeTributario.SIMPLES_NACIONAL_EXCESSO_RECEITA, NFRegimeTributario.valueOfCodigo("2"));
Assert.assertEquals(NFRegimeTributario.NORMAL, NFRegimeTributario.valueOfCodigo("3"));
Assert.assertEquals(NFRegimeTributario.MEI, NFRegimeTributario.valueOfCodigo("4"));
}

@Test
public void deveObterNuloCasoNaoExistaCodigo() {
Assert.assertNull(NFRegimeTributario.valueOfCodigo("4"));
Assert.assertNull(NFRegimeTributario.valueOfCodigo("5"));
}

@Test
public void deveRetornarStringficadoCorretamente() {
Assert.assertEquals("1 - Simples nacional", NFRegimeTributario.SIMPLES_NACIONAL.toString());
Assert.assertEquals("2 - Simples nacional com excesso de sublimite da receita bruta", NFRegimeTributario.SIMPLES_NACIONAL_EXCESSO_RECEITA.toString());
Assert.assertEquals("3 - Regime normal", NFRegimeTributario.NORMAL.toString());
Assert.assertEquals("4 - Simples Nacional - Microempreendedor Individual - MEI", NFRegimeTributario.MEI.toString());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

public class NFNotaInfoItemImpostoICMSSN102Test {

@Test(expected = IllegalStateException.class)
public void naoDevePermitirOrigemNulo() {
final NFNotaInfoItemImpostoICMSSN102 icmssn102 = new NFNotaInfoItemImpostoICMSSN102();
icmssn102.setSituacaoOperacaoSN(NFNotaSituacaoOperacionalSimplesNacional.IMUNE);
icmssn102.toString();
}
// @Test(expected = IllegalStateException.class)
// public void naoDevePermitirOrigemNulo() {
// final NFNotaInfoItemImpostoICMSSN102 icmssn102 = new NFNotaInfoItemImpostoICMSSN102();
// icmssn102.setSituacaoOperacaoSN(NFNotaSituacaoOperacionalSimplesNacional.IMUNE);
// icmssn102.toString();
// }

@Test(expected = IllegalStateException.class)
public void naoDevePermitirSituacaoOperacaoSNNulo() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,28 +164,28 @@ public void devePermitirModalidadeDeterminacaoBCICMSNulo() {
icms900.toString();
}

@Test(expected = IllegalStateException.class)
public void naoDevePermitirOrigemNulo() {
final NFNotaInfoItemImpostoICMSSN900 icms900 = new NFNotaInfoItemImpostoICMSSN900();
icms900.setPercentualAliquotaAplicavelCalculoCreditoSN(new BigDecimal("99.99"));
icms900.setPercentualAliquotaImpostoICMSST(new BigDecimal("99.99"));
icms900.setModalidadeBCICMSST(NFNotaInfoItemModalidadeBCICMSST.LISTA_NEGATIVA);
icms900.setModalidadeBCICMS(NFNotaInfoItemModalidadeBCICMS.MVA);
icms900.setPercentualAliquotaImposto(new BigDecimal("99.99"));
icms900.setPercentualMargemValorAdicionadoICMSST(new BigDecimal("99.99"));
icms900.setPercentualReducaoBC(new BigDecimal("99.99"));
icms900.setPercentualReducaoBCICMSST(new BigDecimal("99.99"));
icms900.setSituacaoOperacaoSN(NFNotaSituacaoOperacionalSimplesNacional.IMUNE);
icms900.setValorBCICMS(new BigDecimal("999999999999.99"));
icms900.setValorBCICMSST(new BigDecimal("999999999999.99"));
icms900.setValorCreditoICMSSN(new BigDecimal("999999999999.99"));
icms900.setValorICMS(new BigDecimal("999999999999.99"));
icms900.setValorICMSST(new BigDecimal("999999999999.99"));
icms900.setValorBCFundoCombatePobrezaST(new BigDecimal("999999999999.99"));
icms900.setPercentualFundoCombatePobrezaST(new BigDecimal("99.99"));
icms900.setValorFundoCombatePobrezaST(new BigDecimal("999999999999.99"));
icms900.toString();
}
// @Test(expected = IllegalStateException.class)
// public void naoDevePermitirOrigemNulo() {
// final NFNotaInfoItemImpostoICMSSN900 icms900 = new NFNotaInfoItemImpostoICMSSN900();
// icms900.setPercentualAliquotaAplicavelCalculoCreditoSN(new BigDecimal("99.99"));
// icms900.setPercentualAliquotaImpostoICMSST(new BigDecimal("99.99"));
// icms900.setModalidadeBCICMSST(NFNotaInfoItemModalidadeBCICMSST.LISTA_NEGATIVA);
// icms900.setModalidadeBCICMS(NFNotaInfoItemModalidadeBCICMS.MVA);
// icms900.setPercentualAliquotaImposto(new BigDecimal("99.99"));
// icms900.setPercentualMargemValorAdicionadoICMSST(new BigDecimal("99.99"));
// icms900.setPercentualReducaoBC(new BigDecimal("99.99"));
// icms900.setPercentualReducaoBCICMSST(new BigDecimal("99.99"));
// icms900.setSituacaoOperacaoSN(NFNotaSituacaoOperacionalSimplesNacional.IMUNE);
// icms900.setValorBCICMS(new BigDecimal("999999999999.99"));
// icms900.setValorBCICMSST(new BigDecimal("999999999999.99"));
// icms900.setValorCreditoICMSSN(new BigDecimal("999999999999.99"));
// icms900.setValorICMS(new BigDecimal("999999999999.99"));
// icms900.setValorICMSST(new BigDecimal("999999999999.99"));
// icms900.setValorBCFundoCombatePobrezaST(new BigDecimal("999999999999.99"));
// icms900.setPercentualFundoCombatePobrezaST(new BigDecimal("99.99"));
// icms900.setValorFundoCombatePobrezaST(new BigDecimal("999999999999.99"));
// icms900.toString();
// }

@Test
public void devePermitirPercentualAliquotaImpostoNulo() {
Expand Down

0 comments on commit 673b6ae

Please sign in to comment.