示例#1
0
        public void GetSelectedIconIds_NoneSelected_ExpectNoneSelections()
        {
            TitledIconList list = OnboardingProfileBuilder.Goals;

            var ids = list.GetSelectedIconIds();

            ids.Should().BeEmpty();
        }
示例#2
0
        public void GetSelectedIconIdsAsCommaSeparatedList_SeveralSelected_IdsMatch()
        {
            TitledIconList list = OnboardingProfileBuilder.Goals;

            list[0].IsSelected = true;
            list[2].IsSelected = true;
            var expectedString = string.Join(",", list.GetSelectedIconIds());

            var output = list.GetSelectedIconIdsAsCommaSeparatedList();

            output.Should().Be(expectedString);
        }
示例#3
0
        public void GetSelectedIconIds_SeveralSelected_ExpectMatchSelection()
        {
            TitledIconList list = OnboardingProfileBuilder.Goals;

            list[0].IsSelected = true;
            list[2].IsSelected = true;
            var expectIds = list.Where(icon => icon.IsSelected).Select(icon => icon.Id).ToList();

            var ids = list.GetSelectedIconIds();

            ids.Should().BeEquivalentTo(expectIds);
        }