public void Setup() { this.entity = new TextCommand(); this.model = new TextCommandModel(); this.mapper = new TextCommandMapper(); }
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>())); }
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)); }
public void Setup() { this.model = new TextCommandModel(); }