• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wmixvideo / nfe / #6582

17 Jul 2025 09:30PM UTC coverage: 51.231% (+24.2%) from 26.996%
#6582

push

web-flow
Adequação do mapeamento de infLocalCarrega e infLocalDescarrega ao xs:choice do schema MDF-e (#1054)

* Adequação do mapeamento de infLocalCarrega e infLocalDescarrega ao xs:choice do schema MDF-e

* Adequação do mapeamento de infLocalCarrega e infLocalDescarrega ao xs:choice do schema MDF-e

14006 of 27339 relevant lines covered (51.23%)

0.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.43
/src/main/java/com/fincatto/documentofiscal/nfe400/classes/nota/NFNotaInfoEmitente.java
1
package com.fincatto.documentofiscal.nfe400.classes.nota;
2

3
import com.fincatto.documentofiscal.DFBase;
4
import com.fincatto.documentofiscal.nfe400.classes.NFEndereco;
5
import com.fincatto.documentofiscal.nfe400.classes.NFRegimeTributario;
6
import com.fincatto.documentofiscal.validadores.DFStringValidador;
7
import org.apache.commons.lang3.StringUtils;
8
import org.simpleframework.xml.Element;
9

10
public class NFNotaInfoEmitente extends DFBase {
1✔
11
    private static final long serialVersionUID = -2236869565066526162L;
12

13
    @Element(name = "CNPJ", required = false)
14
    private String cnpj;
15

16
    @Element(name = "CPF", required = false)
17
    private String cpf;
18
    
19
    @Element(name = "xNome")
20
    private String razaoSocial;
21

22
    @Element(name = "xFant", required = false)
23
    private String nomeFantasia;
24
    
25
    @Element(name = "enderEmit")
26
    private NFEndereco endereco;
27
    
28
    @Element(name = "IE")
29
    private String inscricaoEstadual;
30

31
    @Element(name = "IEST", required = false)
32
    private String inscricaoEstadualSubstituicaoTributaria;
33

34
    @Element(name = "IM", required = false)
35
    private String inscricaoMunicipal;
36

37
    @Element(name = "CNAE", required = false)
38
    private String classificacaoNacionalAtividadesEconomicas;
39
    
40
    @Element(name = "CRT")
41
    private NFRegimeTributario regimeTributario;
42

43
    public void setCnpj(final String cnpj) {
44
        if (this.cpf != null && cnpj != null) {
1✔
45
            throw new IllegalStateException("Nao pode setar CNPJ caso CPF esteja setado");
1✔
46
        }
47
        DFStringValidador.cnpj(cnpj);
1✔
48
        this.cnpj = cnpj;
1✔
49
    }
1✔
50

51
    public void setCpf(final String cpf) {
52
        if (this.cnpj != null && cpf != null) {
1✔
53
            throw new IllegalStateException("Nao pode setar CPF caso CNPJ esteja setado");
1✔
54
        }
55
        DFStringValidador.cpf(cpf);
1✔
56
        this.cpf = cpf;
1✔
57
    }
1✔
58

59
    public void setRazaoSocial(final String razaoSocial) {
60
        DFStringValidador.tamanho60(razaoSocial, "Razao Social Emitente");
1✔
61
        this.razaoSocial = razaoSocial;
1✔
62
    }
1✔
63

64
    public void setNomeFantasia(final String nomeFantasia) {
65
        DFStringValidador.tamanho60(nomeFantasia, "Nome Fantasia Emitente");
1✔
66
        this.nomeFantasia = nomeFantasia;
1✔
67
    }
1✔
68

69
    public void setEndereco(final NFEndereco endereco) {
70
        this.endereco = endereco;
1✔
71
    }
1✔
72

73
    public void setInscricaoEstadual(final String inscricaoEstadual) {
74
        DFStringValidador.inscricaoEstadual(inscricaoEstadual);
1✔
75
        this.inscricaoEstadual = inscricaoEstadual;
1✔
76
    }
1✔
77

78
    public void setInscricaoEstadualSubstituicaoTributaria(final String inscricaoEstadualSubstituicaoTributaria) {
79
        DFStringValidador.inscricaoEstadualSemIsencao(inscricaoEstadualSubstituicaoTributaria);
1✔
80
        this.inscricaoEstadualSubstituicaoTributaria = inscricaoEstadualSubstituicaoTributaria;
1✔
81
    }
1✔
82

83
    public void setInscricaoMunicipal(final String inscricaoMunicipal) {
84
        DFStringValidador.tamanho15(inscricaoMunicipal, "IM Emitente");
1✔
85
        this.inscricaoMunicipal = inscricaoMunicipal;
1✔
86
    }
1✔
87

88
    public void setClassificacaoNacionalAtividadesEconomicas(final String classificacaoNacionalAtividadesEconomicas) {
89
        DFStringValidador.exatamente7N(classificacaoNacionalAtividadesEconomicas, "CNAE Emitente");
1✔
90
        this.classificacaoNacionalAtividadesEconomicas = classificacaoNacionalAtividadesEconomicas;
1✔
91
    }
1✔
92

93
    public void setRegimeTributario(final NFRegimeTributario regimeTributario) {
94
        this.regimeTributario = regimeTributario;
1✔
95
    }
1✔
96

97
    public String getCnpj() {
98
        return this.cnpj;
1✔
99
    }
100

101
    public String getCpf() {
102
        return this.cpf;
1✔
103
    }
104

105
    /**
106
     * @return CPF ou CNPJ do Emitente
107
     */
108
        public String getCpfj() {
109

110
                String cpfj = StringUtils.EMPTY;
×
111
                
112
                if (StringUtils.isNotBlank(cpf)) {
×
113
                        cpfj = cpf;
×
114
                } else if (StringUtils.isNotBlank(cnpj)) {
×
115
                        cpfj = cnpj;
×
116
                }
117
                return cpfj;
×
118
        }
119
        
120
    public String getRazaoSocial() {
121
        return this.razaoSocial;
×
122
    }
123

124
    public String getNomeFantasia() {
125
        return this.nomeFantasia;
×
126
    }
127

128
    public NFEndereco getEndereco() {
129
        return this.endereco;
×
130
    }
131

132
    public String getInscricaoEstadual() {
133
        return this.inscricaoEstadual;
×
134
    }
135

136
    public String getInscricaoEstadualSubstituicaoTributaria() {
137
        return this.inscricaoEstadualSubstituicaoTributaria;
×
138
    }
139

140
    public String getInscricaoMunicipal() {
141
        return this.inscricaoMunicipal;
×
142
    }
143

144
    public String getClassificacaoNacionalAtividadesEconomicas() {
145
        return this.classificacaoNacionalAtividadesEconomicas;
×
146
    }
147

148
    public NFRegimeTributario getRegimeTributario() {
149
        return this.regimeTributario;
×
150
    }
151
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc