public void DadoUmaDevolucaoComNumeroInvalido_Invalid()
        {
            var command = new DevolutionLocationCommand(6);

            var handler = new DevolutionLocationHandler(new FakeRepositoryLocation());

            var result = handler.Handle(command).Result;

            Assert.AreEqual(false, result.Success);
        }
        public void DadoUmaDevolucaoValida_Valid()
        {
            var command = new DevolutionLocationCommand(1);

            var handler = new DevolutionLocationHandler(new FakeRepositoryLocation());

            var result = handler.Handle(command).Result;

            Assert.AreEqual(true, result.Success);
        }
        public void DadoUmaDevolucaoComAtrasoValida_Valid()
        {
            var command = new DevolutionLocationCommand(5);

            var handler = new DevolutionLocationHandler(new FakeRepositoryLocation());

            var result = handler.Handle(command).Result;

            Assert.AreEqual(true, result.Success);
            Assert.AreEqual(true, result.Data.ToString().Contains("ATENÇÃO"));
        }
Exemplo n.º 4
0
 public LocationController(CreateLocationHandler handler, DevolutionLocationHandler handlerDevolution)
 {
     _handler           = handler;
     _handlerDevolution = handlerDevolution;
 }