コード例 #1
0
        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));
        }
コード例 #2
0
 public ActionResult Edit(Option @option)
 {
     if (ModelState.IsValid) {
                 optionService.Update(@option);
                 optionService.Commit();
                 SuccessMessage(FormMessages.SaveSuccess);
                 return RedirectToAction("Index");
         }
         return View(@option);
 }
コード例 #3
0
 public static Option CreateOption()
 {
     Option option = new Option("This is a headline", "Here is some option");
     EntityIdSetter.SetIdOf(option, 1);
     return option;
 }