Ejemplo n.º 1
0
        public SampleTFSSettingViewModel()
            : base(new MockTFSSettingView(), new MockUriHelperVIew())
        {
            this.ConnectUri = new Uri("https://tfs.codeplex.com:443/tfs/TFS12");
            this.BugFilterField = "Work Item Type";
            this.BugFilterValue = "Bugs";
            this.UserName = "******";
            this.Password = "******";

            this.PriorityValues.Add(new CheckString("High"));
            this.PriorityValues.Add(new CheckString("Medium"));
            this.PriorityValues.Add(new CheckString("Low"));
            var values = this.PriorityValues.Where(x => x.Name == "High" || x.Name == "Medium");
            foreach (var value in values)
            {
                value.IsChecked = true;
            }
            this.PriorityRed = "High;Medium";

            var field = new TFSField("Work Item Type");
            field.AllowedValues.Add("Work Item");
            field.AllowedValues.Add("Bugs");

            var idField = new TFSField("ID");

            this.TFSFields.Add(idField);
            this.TFSFields.Add(field);

            this.PropertyMappingCollection["ID"] = "ID";

            this.BugFilterFields.Add(field);
            this.ProgressType = ProgressTypes.SuccessWithError;
            this.ProgressValue = 100;
        }
Ejemplo n.º 2
0
        public void GeneralTFSFieldTest()
        {
            TFSField field = new TFSField("Work Item Type");
            Assert.AreEqual("Work Item Type", field.Name);
            Assert.IsNotNull(field.AllowedValues);
            Assert.AreEqual(0, field.AllowedValues.Count);

            field.AllowedValues.Add("Work Item");
            field.AllowedValues.Add("Bug");
            Assert.AreEqual(2, field.AllowedValues.Count);
        }