public static void ShouldBe(this IChoiceOption option, string key, string text, bool isEnabled, string imageName, string helpText) { option.Key.Should().Be(key); option.Text.Should().Be(text); option.IsEnabled.Should().Be(isEnabled); option.ImageName.Should().Be(imageName); option.HelpText.Should().Be(helpText); }
public bool Choose(IChoiceOption choice, IPlayerContext ctx) { if (choice == null || ctx == null) { throw new ArgumentNullException("one paramter is null but can't !"); } if (!Choices.Any(c => c.Text == choice.Text)) { return(false); } if (!choice.CanChoose(ctx)) { return(false); } CurrentChoice = choice; return(true); }
public ChoiceOptionMV(IChoiceOption option) : base(option) { }