예제 #1
0
파일: AllTests.cs 프로젝트: mhusen/Eto
        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);
				}
			}
        }
예제 #2
0
        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);
				}
			}
        }
예제 #3
0
파일: AllTests.cs 프로젝트: nzysoft/Eto
        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);
                }
            }
        }
예제 #4
0
파일: TestItem.cs 프로젝트: mhusen/Eto
		public TestItem(String uniqueId, String title, String subtitle, String imagePath, String description, String content, TestGroup group,
			Func<FrameworkElement> getControl)
			: base(uniqueId, title, subtitle, imagePath, description)
		{
			this.getControl = getControl;
			this._content = content;
			this._group = group;
		}
예제 #5
0
        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);
                }
            }
        }
예제 #6
0
파일: TestItem.cs 프로젝트: nzysoft/Eto
 public TestItem(String uniqueId, String title, String subtitle, String imagePath, String description, String content, TestGroup group,
                 Func <FrameworkElement> getControl)
     : base(uniqueId, title, subtitle, imagePath, description)
 {
     this.getControl = getControl;
     this._content   = content;
     this._group     = group;
 }