public void isExecutable_EmpresaNotExists_ReturnFalse()
        {
            var rtn = new RTN("08011985123960");
            var repositoryReadOnly = Mock.Of <IEmpresaRepositoryReadOnly>();
            var repositoryCommand  = Mock.Of <IEmpresaRepositoryCommands>();
            var uof = Mock.Of <Func <IUnitOfWork> >();

            Mock.Get(uof).Setup(x => x()).Returns(new DummyUnitOfWork());
            Mock.Get(repositoryReadOnly).Setup(x => x.exists(rtn)).Returns(false);

            var command = new CommandUpdateEmpresaContrato(repositoryReadOnly, repositoryCommand, uof);

            var response = command.isExecutable(rtn);

            Assert.IsFalse(response);
        }
        public void execute_EmpresaExists_UpdatedEmpresa()
        {
            var contentFile        = new ContentFile(new byte[] { 1, 1 });
            var rtn                = new RTN("08011985123960");
            var repositoryReadOnly = Mock.Of <IEmpresaRepositoryReadOnly>();
            var repositoryCommand  = Mock.Of <IEmpresaRepositoryCommands>();
            var uof                = Mock.Of <Func <IUnitOfWork> >();

            Mock.Get(uof).Setup(x => x()).Returns(new DummyUnitOfWork());


            var command = new CommandUpdateEmpresaContrato(repositoryReadOnly, repositoryCommand, uof);

            command.execute(rtn, contentFile);

            Mock.Get(repositoryCommand).Verify(x => x.updateContrato(rtn, contentFile));
        }