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

wmixvideo / nfe / #7495

24 Jun 2025 02:03AM UTC coverage: 51.463% (+24.5%) from 26.996%
#7495

push

web-flow
Merge 80a657e41 into bb9f583b3

14 of 20 new or added lines in 1 file covered. (70.0%)

2968 existing lines in 402 files now uncovered.

14018 of 27239 relevant lines covered (51.46%)

0.51 hits per line

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

50.0
/src/main/java/com/fincatto/documentofiscal/mdfe3/classes/nota/MDFInfoAutorizacaoDownload.java
1
package com.fincatto.documentofiscal.mdfe3.classes.nota;
2

3
import org.simpleframework.xml.Element;
4
import org.simpleframework.xml.Namespace;
5
import org.simpleframework.xml.Root;
6

7
import com.fincatto.documentofiscal.DFBase;
8
import com.fincatto.documentofiscal.validadores.DFStringValidador;
9

10
/**
11
 * Created by Eldevan Nery Junior on 03/11/17.
12
 * <h1>Autorizados para download do XML do DF-e</h1>
13
 */
14
@Root(name = "autXML")
15
@Namespace(reference = "http://www.portalfiscal.inf.br/mdfe")
16
public class MDFInfoAutorizacaoDownload extends DFBase {
17
    private static final long serialVersionUID = -5711457880712720488L;
18

19
    private static final String INFO = "Autorizacao Download MDFe";
20

21
    @Element(name = "CNPJ", required = false)
22
    private String cnpj;
23

24
    @Element(name = "CPF", required = false)
25
    private String cpf;
26

27
    public MDFInfoAutorizacaoDownload() {
1✔
28
        this.cnpj = null;
1✔
29
        this.cpf = null;
1✔
30
    }
1✔
31

32
    public String getCnpj() {
UNCOV
33
        return this.cnpj;
×
34
    }
35

36
    /**
37
     * CNPJ do autorizado<br>
38
     * Informar zeros não significativos
39
     */
40
    public void setCnpj(final String cnpj) {
41
        if (this.cpf != null) {
1✔
UNCOV
42
            throw new IllegalStateException("Nao deve setar CNPJ se CPF esteja setado em " + MDFInfoAutorizacaoDownload.INFO);
×
43
        }
44
        this.cnpj = DFStringValidador.cnpj(cnpj, MDFInfoAutorizacaoDownload.INFO);
1✔
45
    }
1✔
46

47
    public String getCpf() {
UNCOV
48
        return this.cpf;
×
49
    }
50

51
    /**
52
     * CPF do autorizado<br>
53
     * Informar zeros não significativos
54
     */
55
    public void setCpf(final String cpf) {
56
        if (this.cnpj != null) {
×
UNCOV
57
            throw new IllegalStateException("Nao deve setar CPF se CNPJ esteja setado em " + MDFInfoAutorizacaoDownload.INFO);
×
58
        }
59
        this.cpf = DFStringValidador.cpf(cpf, MDFInfoAutorizacaoDownload.INFO);
×
UNCOV
60
    }
×
61
}
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

© 2026 Coveralls, Inc