public Dado_Uma_Pessoa() { this._pessoaPadrao = new Empresa("MR VIDRAÇARIA", DateTime.Now); this._telefonePadrao = new Telefone("(43) 3534-2350", TipoTelefone.Comercial); CEP cep = "86430-000"; Cidade cidade = CidadeStub.GetInstance(1, "SANTO ANTÔNIO DA PLATINA", EstadoStub.GetInstance(1, "PR")); this._enderecoPadrao = new Endereco("RUA JOSÉ BONIFÁCIO", "834", cep, cidade, TipoEndereco.Cobranca); }
public Dado_Um_ValidadorEmpresa() { this._empresaPadrao = EmpresaStub.GetInstance(0, "MR VIDRACARIA", DateTime.Now); this._telefonePadrao = new Telefone("(43) 3534-2350", TipoTelefone.Comercial); this._enderecoPadrao = new Endereco("Rua de teste", "823", new CEP("86430-000"), CidadeStub.GetInstance(1, "SANTO ANTÔNIO DA PLATINA", EstadoStub.GetInstance(1, "PR")), TipoEndereco.Comercial); }
protected override bool ComparaValor(ObjetoValor obj) { Telefone t = (Telefone)obj; return((t.ValorTelefone + t.Tipo.ToString()).Equals(this.ValorTelefone + this._tipo.ToString())); }
public Dado_Um_ValidadorCliente() { this._clientePadrao = ClienteStub.GetInstance(0, "RICARDO MEDEIROS DA COSTA JUNIOR", Convert.ToDateTime("14/08/1991")); this._enderecoPadrao = new Endereco("RUA JOSÉ BONIFÁCIO", "834", new CEP("86430-000"), CidadeStub.GetInstance(1, "SANTO ANTÔNIO DA PLATINA", EstadoStub.GetInstance(1, "PR")), TipoEndereco.Residencial); this._telefonePadrao = new Telefone("(43) 9957-9663", TipoTelefone.Celular); }
public virtual void RemoveTelefone(Telefone telefone) { if (this._telefones == null) return; this._telefones.Remove(telefone); }
public virtual void AdicionaTelefone(Telefone telefone) { if (telefone == null) throw new ExcecaoParametroInvalido("Pessoa.Telefone"); if (!this.TelefonesPermitidos().Contains(telefone.Tipo)) throw new ExcecaoTelefoneNaoPermitido(this.TipoPessoa, telefone.Tipo); if (this._telefones == null) this._telefones = new List<Telefone>(); if (this._telefones.Contains(telefone)) throw new ExcecaoParametroRepetido("Pessoa.Telefone"); this._telefones.Add(telefone); }