Example #1
0
        public void Execute_ChangeTypelogType()
        {
            var model = new TimelogTypeModel {
                TimelogTypeId = 2
            };

            _repository.Setup(c => c.Get <TimelogTypeModel>(2))
            .Returns(model);

            _handler.Execute(new TimelogTypePutOneCommand(2, "Tipo22"));

            Assert.Equal("Tipo22", model.TimelogType);
        }
        public void Execute_Ok()
        {
            var timelogType = new TimelogTypeModel {
                TimelogTypeId = 2
            };

            _next.Setup(c => c.Execute(It.IsAny <TimelogTypeGetOneCommand>()))
            .Returns(timelogType);

            var result = _validator.Execute(new TimelogTypeGetOneCommand(2));

            Assert.Equal(timelogType, result);
        }