Ejemplo n.º 1
0
        public void TestGetId()
        {
            var retorno = _seguradoServices.GetById(1);

            Assert.NotNull(retorno);
            Assert.NotNull(retorno.Id > 0);
        }
Ejemplo n.º 2
0
        public void TestCalculo()
        {
            double valorSeguro = 270.37;

            var carro    = _carroServices.GetById(1);
            var segurado = _seguradoServices.GetById(1);

            var seguro = new Seguro()
            {
                Id         = 10,
                CarroId    = carro.Id,
                SeguradoId = segurado.Id,
                Carro      = carro,
                Segurado   = segurado
            };

            _seguroServices.CalcularSeguro(seguro);

            Assert.AreEqual(seguro.PrecoSeguro, valorSeguro);
        }