public async Task TestDoneMinChoicesCard() { var done = new DoneMinChoices(); //The number of min choices is specified on the decision component var choice = new Choice() { Label = "choice1" , Position = 1 , Selected = false }; var choices = new Dictionary <string, Choice>(); choices.Add("id1", choice); var component = new ComponentDecision() { Choices = choices , Done = done }; await TestComponentCard(component); //For coverage component.SetDefaults(); done.SetDefaults(); Assert.NotNull(done.ToJson()); Assert.NotNull(done.ToString()); }
public async Task TestDecisionComponentCard() { var choice = new Choice() { Label = "choice1" , Position = 1 , Selected = false }; var choices = new Dictionary <string, Choice>(); choices.Add("id1", choice); var component = new ComponentDecision() { Choices = choices , Link = new ComponentDecisionLink() { Text = "Link" , SequenceId = AssignmentUtils.ROOT_SEQUENCE_ID , CardId = CARD_ID } }; await TestComponentCard(component); //For coverage component.SetDefaults(); choice.ToString(); choice.ToJson(); choice.SetDefaults(); }