• 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

45.45
/src/main/java/com/fincatto/documentofiscal/mdfe3/classes/nota/MDFInfoEmitente.java
1
package com.fincatto.documentofiscal.mdfe3.classes.nota;
2

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

10
/**
11
 * Created by Eldevan Nery Junior on 03/11/17.
12
 * <h1>Identificação do Emitente do Manifesto</h1>
13
 */
14
@Root(name = "emit")
15
@Namespace(reference = "http://www.portalfiscal.inf.br/mdfe")
16
public class MDFInfoEmitente extends DFBase {
1✔
17
    private static final long serialVersionUID = 6209368588212530094L;
18

19
    private static final String INFO = "Emitente do Manifesto";
20
    
21
    @Element(name = "CNPJ", required = false)
22
    private String cnpj;
23

24
    @Element(name = "CPF", required = false)
25
    private String cpf;
26
    
27
    @Element(name = "IE")
28
    private String inscricaoEstadual;
29
    
30
    @Element(name = "xNome")
31
    private String razaoSocial;
32

33
    @Element(name = "xFant", required = false)
34
    private String nomeFantasia;
35
    
36
    @Element(name = "enderEmit")
37
    private MDFInfoEmitenteEndereco endereco;
38

39
    public String getCnpj() {
UNCOV
40
        return this.cnpj;
×
41
    }
42

43
    /**
44
     * CNPJ do emitente<br>
45
     * Informar zeros não significativos
46
     */
47
    public void setCnpj(final String cnpj) {
48
        if (this.cpf != null && cnpj != null) {
1✔
UNCOV
49
            throw new IllegalStateException("Nao pode setar CNPJ caso CPF esteja setado");
×
50
        }
51
        DFStringValidador.cnpj(cnpj);
1✔
52
        this.cnpj = cnpj;
1✔
53
    }
1✔
54

55
    public String getCpf() {
UNCOV
56
        return cpf;
×
57
    }
58

59
    public void setCpf(final String cpf) {
UNCOV
60
        if (this.cnpj != null && cpf != null) {
×
UNCOV
61
            throw new IllegalStateException("Nao pode setar CPF caso CNPJ esteja setado");
×
62
        }
UNCOV
63
        DFStringValidador.cpf(cpf);
×
UNCOV
64
        this.cpf = cpf;
×
65
    }
×
66

67
    public String getCpfj() {
68

UNCOV
69
        String cpfj = StringUtils.EMPTY;
×
70

UNCOV
71
        if (StringUtils.isNotBlank(cpf)) {
×
UNCOV
72
            cpfj = cpf;
×
UNCOV
73
        } else if (StringUtils.isNotBlank(cnpj)) {
×
UNCOV
74
            cpfj = cnpj;
×
75
        }
UNCOV
76
        return cpfj;
×
77
    }
78

79
    public String getInscricaoEstadual() {
UNCOV
80
        return this.inscricaoEstadual;
×
81
    }
82

83
    /**
84
     * Inscrição Estadual do Emitente
85
     */
86
    public void setInscricaoEstadual(final String inscricaoEstadual) {
87
        this.inscricaoEstadual = DFStringValidador.inscricaoEstadualSemIsencao(inscricaoEstadual, MDFInfoEmitente.INFO);
1✔
88
    }
1✔
89

90
    public String getRazaoSocial() {
UNCOV
91
        return this.razaoSocial;
×
92
    }
93

94
    /**
95
     * Razão social ou Nome do emitente
96
     */
97
    public void setRazaoSocial(final String xNome) {
98
        DFStringValidador.tamanho2ate60(xNome, "Razão social ou Nome em " + MDFInfoEmitente.INFO);
1✔
99
        this.razaoSocial = xNome;
1✔
100
    }
1✔
101

102
    public String getNomeFantasia() {
UNCOV
103
        return this.nomeFantasia;
×
104
    }
105

106
    /**
107
     * Nome fantasia
108
     */
109
    public void setNomeFantasia(final String xFant) {
110
        DFStringValidador.tamanho2ate60(xFant, "Nome fantasia em " + MDFInfoEmitente.INFO);
1✔
111
        this.nomeFantasia = xFant;
1✔
112
    }
1✔
113

114
    /**
115
     * Endereço do emitente
116
     */
117
    public MDFInfoEmitenteEndereco getEndereco() {
UNCOV
118
        return this.endereco;
×
119
    }
120

121
    public void setEndereco(final MDFInfoEmitenteEndereco endereco) {
122
        this.endereco = endereco;
1✔
123
    }
1✔
124

125
}
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