private void AssertChangeInfo(int questionId, string caption, string oldDisplayValue, string newDisplayValue, BaseFormDataViewModel model) { ChangeNoteViewModel changeInfo; changeInfo = model.ChangeInfos.FirstOrDefault(ci => ci.QuestionId == questionId); Assert.That(changeInfo, Is.Not.Null, caption + " change info (" + questionId + ") was not found"); Assert.That(changeInfo.QuestionName, Is.EqualTo(caption), "Captions does not match"); Assert.That(changeInfo.NewValue, Is.EqualTo(newDisplayValue), "New display value for " + caption + " does not match"); Assert.That(changeInfo.OriginalValue, Is.EqualTo(oldDisplayValue), "Old display value for " + caption + " does not match"); Assert.That(string.IsNullOrEmpty(changeInfo.ChangeReason)); }
private void AssertChangeInfo(Question question, string oldDisplayValue, string newDisplayValue, BaseFormDataViewModel model) { AssertChangeInfo(question.Id, question.Caption, oldDisplayValue, newDisplayValue, model); }