Example #1
0
        public void DeveExisterSomenteCargoDeVendedorEGerente()
        {
            Funcionario naoExiste        = new Funcionario();
            Funcionario vendedor         = new Funcionario();
            Funcionario gerente          = new Funcionario();
            Funcionario gerenteNaoExiste = new Funcionario();

            naoExiste.Cargo        = "Vendedor Ultra VIP";
            vendedor.Cargo         = "Vendedor";
            gerente.Cargo          = "Gerente";
            gerenteNaoExiste.Cargo = "Gerente Ultra Mega Gerente Power User";

            FuncionarioBO bo      = new FuncionarioBO();
            bool          existe1 = bo.ChecarCargo(naoExiste);
            bool          existe2 = bo.ChecarCargo(vendedor);
            bool          existe3 = bo.ChecarCargo(gerente);
            bool          existe4 = bo.ChecarCargo(gerenteNaoExiste);

            Assert.IsFalse(existe1);
            Assert.IsTrue(existe2);
            Assert.IsTrue(existe3);
            Assert.IsFalse(existe4);
        }