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

wmixvideo / nfe / #6280

15 Jan 2016 07:08PM UTC coverage: 80.525% (-0.4%) from 80.934%
#6280

push

travis-ci

jefperito
Corrigido testes

Corrigido testes (eclipse cacheou os xsd e houve um problema de testes)

4445 of 5520 relevant lines covered (80.53%)

50.77 hits per line

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

78.38
/src/main/java/com/fincatto/nfe310/classes/nota/NFNotaInfoTransporte.java
1
package com.fincatto.nfe310.classes.nota;
2

3
import java.util.List;
4

5
import org.simpleframework.xml.Element;
6
import org.simpleframework.xml.ElementList;
7

8
import com.fincatto.nfe310.classes.NFBase;
9
import com.fincatto.nfe310.classes.NFModalidadeFrete;
10
import com.fincatto.nfe310.validadores.ListValidador;
11
import com.fincatto.nfe310.validadores.StringValidador;
12

13
public class NFNotaInfoTransporte extends NFBase {
46✔
14
    @Element(name = "modFrete", required = true)
15
    private NFModalidadeFrete modalidadeFrete;
16

17
    @Element(name = "transporta", required = false)
18
    private NFNotaInfoTransportador transportador;
19

20
    @Element(name = "retTransp", required = false)
21
    private NFNotaInfoRetencaoICMSTransporte icmsTransporte;
22

23
    @Element(name = "veicTransp", required = false)
24
    private NFNotaInfoVeiculo veiculo;
25

26
    @ElementList(entry = "reboque", inline = true, required = false)
27
    private List<NFNotaInfoReboque> reboques;
28

29
    @Element(name = "vagao", required = false)
30
    private String vagao;
31

32
    @Element(name = "balsa", required = false)
33
    private String balsa;
34

35
    @ElementList(entry = "vol", inline = true, required = false)
36
    private List<NFNotaInfoVolume> volumes;
37

38
    public void setModalidadeFrete(final NFModalidadeFrete modalidadeFrete) {
39
        this.modalidadeFrete = modalidadeFrete;
35✔
40
    }
35✔
41

42
    public void setTransportador(final NFNotaInfoTransportador transportador) {
43
        this.transportador = transportador;
35✔
44
    }
35✔
45

46
    public void setIcmsTransporte(final NFNotaInfoRetencaoICMSTransporte icmsTransporte) {
47
        this.icmsTransporte = icmsTransporte;
35✔
48
    }
35✔
49

50
    public void setVeiculo(final NFNotaInfoVeiculo veiculo) {
51
        if (this.reboques != null || this.balsa != null || this.vagao != null) {
2✔
52
            throw new IllegalStateException("Veiculo, balsa, reboque e vagao sao mutuamente exclusivos");
1✔
53
        }
54
        this.veiculo = veiculo;
1✔
55
    }
1✔
56

57
    public void setReboques(final List<NFNotaInfoReboque> reboques) {
58
        if (this.veiculo != null || this.balsa != null || this.vagao != null) {
37✔
59
            throw new IllegalStateException("Veiculo, balsa, reboque e vagao sao mutuamente exclusivos");
1✔
60
        }
61
        ListValidador.tamanho5(reboques);
36✔
62
        this.reboques = reboques;
36✔
63
    }
36✔
64

65
    public void setVolumes(final List<NFNotaInfoVolume> volumes) {
66
        ListValidador.tamanho5000(volumes);
35✔
67
        this.volumes = volumes;
34✔
68
    }
34✔
69

70
    public void setVagao(final String vagao) {
71
        if (this.balsa != null || this.reboques != null || this.veiculo != null) {
2✔
72
            throw new IllegalStateException("Veiculo, balsa, reboque e vagao e reboque sao mutuamente exclusivo");
1✔
73
        }
74
        StringValidador.tamanho20(vagao);
1✔
75
        this.vagao = vagao;
1✔
76
    }
1✔
77

78
    public void setBalsa(final String balsa) {
79
        if (this.vagao != null || this.reboques != null || this.veiculo != null) {
2✔
80
            throw new IllegalStateException("Veiculo, balsa, reboque e vagao e reboque sao mutuamente exclusivo");
1✔
81
        }
82
        StringValidador.tamanho20(balsa);
1✔
83
        this.balsa = balsa;
1✔
84
    }
1✔
85

86
    public NFModalidadeFrete getModalidadeFrete() {
87
        return this.modalidadeFrete;
×
88
    }
89

90
    public NFNotaInfoTransportador getTransportador() {
91
        return this.transportador;
×
92
    }
93

94
    public NFNotaInfoRetencaoICMSTransporte getIcmsTransporte() {
95
        return this.icmsTransporte;
×
96
    }
97

98
    public NFNotaInfoVeiculo getVeiculo() {
99
        return this.veiculo;
×
100
    }
101

102
    public List<NFNotaInfoReboque> getReboques() {
103
        return this.reboques;
×
104
    }
105

106
    public String getVagao() {
107
        return this.vagao;
×
108
    }
109

110
    public String getBalsa() {
111
        return this.balsa;
×
112
    }
113

114
    public List<NFNotaInfoVolume> getVolumes() {
115
        return this.volumes;
×
116
    }
117
}
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