예제 #1
0
        public void ShouldReturnErrorWhenEmissaoNotaFiscalCommandIsInvalid()
        {
            var obj = new EmissaoNotaFiscalCommand();

            obj.Validate();

            Assert.AreEqual(false, obj.Valid);
        }
예제 #2
0
        public void ShouldReturnErrorWhenEmissaoNotaFiscalCommandSemEstadoDestino()
        {
            var obj = new EmissaoNotaFiscalCommand();

            obj.NomeCliente  = "Cliente de teste";
            obj.EstadoOrigem = EEstados.SP;
            obj.Validate();

            Assert.AreEqual(false, obj.Valid);
        }
예제 #3
0
        public void ShouldReturnSuccessWhenEmissaoNotaFiscalCommandIsValid()
        {
            var obj = new EmissaoNotaFiscalCommand();

            obj.NomeCliente   = "Cliente de teste";
            obj.EstadoDestino = new EstadoDestino(EEstados.SP);
            obj.EstadoOrigem  = EEstados.SP;

            obj.Validate();

            Assert.AreEqual(true, obj.Valid);
        }