public AllTests() { var groupSections = TestSections.Get(TestApplication.DefaultTestAssemblies()).ToList(); for (var i = 0; i < groupSections.Count; ++i) { var groupSection = groupSections[i]; var testSections = groupSection.ToList(); // the children var testGroup = new TestGroup( uniqueId: "Group-" + i, title: groupSection.Text, subtitle: string.Format("{0} Tests", testSections.Count), imagePath: "Assets/DarkGray.png", description: ""); // TODO: add a Description field to tests. AllGroups.Add(testGroup); for (var j = 0; j < testSections.Count; ++j) { var testSection = groupSection[j]; var testItem = new TestItem( uniqueId: string.Format("Group-{0}-Item-{1}", i, j), title: testSection.Text, subtitle: "", imagePath: "Assets/LightGray.png", description: "", content: "Hello!", group: testGroup, getControl: () => GetControl(testSection)); testGroup.Items.Add(testItem); } } }
public AllTests() { String ITEM_CONTENT = String.Format("Item Content: {0}\n\n{0}\n\n{0}\n\n{0}\n\n{0}\n\n{0}\n\n{0}", "Curabitur class aliquam vestibulum nam curae maecenas sed integer cras phasellus suspendisse quisque donec dis praesent accumsan bibendum pellentesque condimentum adipiscing etiam consequat vivamus dictumst aliquam duis convallis scelerisque est parturient ullamcorper aliquet fusce suspendisse nunc hac eleifend amet blandit facilisi condimentum commodo scelerisque faucibus aenean ullamcorper ante mauris dignissim consectetuer nullam lorem vestibulum habitant conubia elementum pellentesque morbi facilisis arcu sollicitudin diam cubilia aptent vestibulum auctor eget dapibus pellentesque inceptos leo egestas interdum nulla consectetuer suspendisse adipiscing pellentesque proin lobortis sollicitudin augue elit mus congue fermentum parturient fringilla euismod feugiat"); var groupSections = TestSections.Get().ToList(); for (var i = 0; i < groupSections.Count; ++i) { var groupSection = groupSections[i]; var testSections = groupSection.ToList(); // the children var testGroup = new TestGroup( uniqueId: "Group-" + i, title: groupSection.Text, subtitle: string.Format("{0} Tests", testSections.Count), imagePath: "Assets/DarkGray.png", description: ""); // TODO: add a Description field to tests. AllGroups.Add(testGroup); for (var j = 0; j < testSections.Count; ++j) { var testSection = groupSection[j]; var testItem = new TestItem( uniqueId: string.Format("Group-{0}-Item-{1}", i, j), title: testSection.Text, subtitle: "", imagePath: "Assets/LightGray.png", description: "", content: ITEM_CONTENT, group: testGroup, getControl: () => GetControl(testSection)); testGroup.Items.Add(testItem); } } }