示例#1
0
        public void Setup()
        {
            this.entity = new TextCommand();
            this.model  = new TextCommandModel();

            this.mapper = new TextCommandMapper();
        }
示例#2
0
        public void UpdatingATextModelShouldUpdateEntity()
        {
            TextCommandModel model = new TextCommandModel();

            this.viewModel.Commands.Add(model);
            this.viewModel.IsSelected = true;

            model.Timeout = 1;

            this.repository.Verify(r => r.AddOrUpdate(It.IsAny <TextCommand>()));
            this.mapper.Verify(r => r.MapToEntity(model, It.IsAny <TextCommand>()));
        }
示例#3
0
        public void RemoveTextCommandCommandShouldRemoveResponse(string id)
        {
            TextCommandModel model = new TextCommandModel {
                Id = id
            };

            this.viewModel.Commands.Add(model);

            this.viewModel.RemoveTextCommandCommand.Execute(model);

            Assert.AreEqual(0, this.viewModel.Commands.Count);
            this.repository.Verify(r => r.Remove(id));
        }
示例#4
0
 public void Setup()
 {
     this.model = new TextCommandModel();
 }