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

wmixvideo / nfe / #6266

21 Mar 2025 11:46AM UTC coverage: 52.671% (+25.7%) from 26.996%
#6266

push

luciano.antunes
Nota Fiscal Fácil

0 of 21 new or added lines in 2 files covered. (0.0%)

2924 existing lines in 401 files now uncovered.

14002 of 26584 relevant lines covered (52.67%)

0.53 hits per line

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

69.44
/src/main/java/com/fincatto/documentofiscal/nfe400/classes/nota/NFNotaInfoLocal.java
1
package com.fincatto.documentofiscal.nfe400.classes.nota;
2

3
import com.fincatto.documentofiscal.DFBase;
4
import com.fincatto.documentofiscal.DFPais;
5
import com.fincatto.documentofiscal.DFUnidadeFederativa;
6
import com.fincatto.documentofiscal.nfe400.converters.NFStringNullToEmptyConverter;
7
import com.fincatto.documentofiscal.validadores.DFStringValidador;
8
import org.apache.commons.lang3.StringUtils;
9
import org.simpleframework.xml.Element;
10
import org.simpleframework.xml.convert.Convert;
11

12
public class NFNotaInfoLocal extends DFBase {
1✔
13
    private static final long serialVersionUID = -6618642990785758823L;
14

15
    @Element(name = "CNPJ", required = false)
16
    @Convert(NFStringNullToEmptyConverter.class)
17
    private String cnpj;
18

19
    @Element(name = "CPF", required = false)
20
    private String cpf;
21
    
22
    /**
23
     * Razão Social ou Nome do Expedidor/Recebedor.
24
     */
25
    @Element(name = "xNome", required = false)
26
    private String nome;
27
    
28
    @Element(name = "xLgr")
29
    private String logradouro;
30
    
31
    @Element(name = "nro")
32
    private String numero;
33

34
    @Element(name = "xCpl", required = false)
35
    private String complemento;
36
    
37
    @Element(name = "xBairro")
38
    private String bairro;
39
    
40
    @Element(name = "cMun")
41
    private String codigoMunicipio;
42
    
43
    @Element(name = "xMun")
44
    private String nomeMunicipio;
45
    
46
    @Element(name = "UF")
47
    private String uf;
48
    
49
    @Element(name = "CEP", required = false)
50
    private String cep;
51
    
52
    @Element(name = "cPais", required = false)
53
    private DFPais codigoPais;
54
    
55
    @Element(name = "xPais", required = false)
56
    private String descricaoPais;
57
    
58
    /**
59
     * Telefone, preencher com Código DDD + número do telefone ,
60
     * nas operações com exterior é permtido informar o código do país + código da localidade + número do telefone
61
     */
62
    @Element(name = "fone", required = false)
63
    private String telefone;
64
    
65
    /**
66
     * Informar o e-mail do expedidor/Recebedor.
67
     * O campo pode ser utilizado para informar o e-mail de recepção da NF-e indicada pelo expedidor
68
     */
69
    @Element(name = "email", required = false)
70
    private String email;
71
    
72
    @Element(name = "IE", required = false)
73
    private String inscricaoEstadual;
74

75
    public void setCnpj(final String cnpj) {
76
        if (this.cpf != null) {
1✔
77
            throw new IllegalStateException("Nao pode setar CNPJ por que o CPF foi setado");
1✔
78
        }
79
    
80
        if (!StringUtils.isBlank(cnpj)) {
1✔
81
            DFStringValidador.cnpj(cnpj);
1✔
82
        }
83

84
        this.cnpj = cnpj;
1✔
85
    }
1✔
86

87
    public void setCpf(final String cpf) {
88
        if (this.cnpj != null) {
1✔
89
            throw new IllegalStateException("Nao pode setar CPF por que o CNPJ foi setado");
1✔
90
        }
91
        DFStringValidador.cpf(cpf);
1✔
92
        this.cpf = cpf;
1✔
93
    }
1✔
94

95
    public void setLogradouro(final String logradouro) {
96
        DFStringValidador.tamanho60(logradouro, "Logradouro Local");
1✔
97
        this.logradouro = logradouro;
1✔
98
    }
1✔
99

100
    public void setNumero(final String numero) {
101
        DFStringValidador.tamanho60(numero, "Numero Local");
1✔
102
        this.numero = numero;
1✔
103
    }
1✔
104

105
    public void setComplemento(final String complemento) {
106
        DFStringValidador.tamanho60(complemento, "Complemento Local");
1✔
107
        this.complemento = complemento;
1✔
108
    }
1✔
109

110
    public void setBairro(final String bairro) {
111
        DFStringValidador.tamanho2ate60(bairro, "Bairro Local");
1✔
112
        this.bairro = bairro;
1✔
113
    }
1✔
114

115
    public void setCodigoMunicipio(final String codigoMunicipio) {
116
        DFStringValidador.exatamente7(codigoMunicipio, "Codigo Municipio Local");
1✔
117
        this.codigoMunicipio = codigoMunicipio;
1✔
118
    }
1✔
119

120
    public void setNomeMunicipio(final String nomeMunicipio) {
121
        DFStringValidador.tamanho60(nomeMunicipio, "Nome Municipio Local");
1✔
122
        this.nomeMunicipio = nomeMunicipio;
1✔
123
    }
1✔
124
    
125
    public void setNome(final String nome) {
126
        DFStringValidador.tamanho2ate60(nome, "Nome do Expedidor/Recebedor");
1✔
127
        this.nome = nome;
1✔
128
    }
1✔
129
    
130
    public void setCep(final String cep) {
UNCOV
131
        DFStringValidador.exatamente8(cep, "CEP");
×
UNCOV
132
        this.cep = cep;
×
UNCOV
133
    }
×
134
    
135
    public void setCodigoPais(final String codigoPais) {
UNCOV
136
        DFStringValidador.tamanho2a4(codigoPais, "Codigo do pais");
×
UNCOV
137
        this.codigoPais = DFPais.valueOfCodigo(codigoPais);
×
UNCOV
138
    }
×
139
    
140
    public void setCodigoPais(final DFPais codigoPais) {
141
        this.codigoPais = codigoPais;
1✔
142
    }
1✔
143
    
144
    public void setDescricaoPais(final String descricaoPais) {
145
        DFStringValidador.tamanho60(descricaoPais, "Descricao do pais");
1✔
146
        this.descricaoPais = descricaoPais;
1✔
147
    }
1✔
148
    
149
    public void setTelefone(final String telefone) {
150
        DFStringValidador.telefone(telefone);
1✔
151
        this.telefone = telefone;
1✔
152
    }
1✔
153
    
154
    /**
155
     * Endereço de email
156
     */
157
    public void setEmail(final String email) {
158
        DFStringValidador.tamanho60(email, "Endereço de email");
1✔
159
        DFStringValidador.email(email);
1✔
160
        this.email = email;
1✔
161
    }
1✔
162
    
163
    public void setInscricaoEstadual(String inscricaoEstadual) {
164
        DFStringValidador.inscricaoEstadual(inscricaoEstadual);
1✔
165
        this.inscricaoEstadual = inscricaoEstadual;
1✔
166
    }
1✔
167

168
    public void setUf(final DFUnidadeFederativa uf) {
169
        this.uf = uf.getCodigo();
1✔
170
    }
1✔
171

172
    public String getCnpj() {
UNCOV
173
        return this.cnpj;
×
174
    }
175

176
    public String getCpf() {
UNCOV
177
        return this.cpf;
×
178
    }
179
    
180
    public String getNome() {
UNCOV
181
        return this.nome;
×
182
    }
183

184
    public String getLogradouro() {
UNCOV
185
        return this.logradouro;
×
186
    }
187

188
    public String getNumero() {
UNCOV
189
        return this.numero;
×
190
    }
191

192
    public String getComplemento() {
UNCOV
193
        return this.complemento;
×
194
    }
195

196
    public String getBairro() {
UNCOV
197
        return this.bairro;
×
198
    }
199

200
    public String getCodigoMunicipio() {
UNCOV
201
        return this.codigoMunicipio;
×
202
    }
203

204
    public String getNomeMunicipio() {
UNCOV
205
        return this.nomeMunicipio;
×
206
    }
207

208
    public String getUf() {
UNCOV
209
        return this.uf;
×
210
    }
211
    
212
    public String getCep() {
UNCOV
213
        return cep;
×
214
    }
215
    
216
    public DFPais getCodigoPais() {
UNCOV
217
        return codigoPais;
×
218
    }
219
    
220
    public String getDescricaoPais() {
UNCOV
221
        return descricaoPais;
×
222
    }
223
    
224
    public String getTelefone() {
UNCOV
225
        return telefone;
×
226
    }
227
    
228
    public String getEmail() {
UNCOV
229
        return email;
×
230
    }
231
    
232
    public String getInscricaoEstadual() {
UNCOV
233
        return inscricaoEstadual;
×
234
    }
235
}
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