public void CanCreateOptionBlankValue() { string optionName = "TEST123"; string optionValue = " "; Option option = new Option(optionName, optionValue); Assert.That(option.Name, Is.EqualTo(optionName)); Assert.That(option.Value, Is.EqualTo(optionValue)); }
public ActionResult Edit(Option @option) { if (ModelState.IsValid) { optionService.Update(@option); optionService.Commit(); SuccessMessage(FormMessages.SaveSuccess); return RedirectToAction("Index"); } return View(@option); }
public static Option CreateOption() { Option option = new Option("This is a headline", "Here is some option"); EntityIdSetter.SetIdOf(option, 1); return option; }