public void ItemVMs_HaveCorrectCaptions() { Department department = new Department("First department"); UserVM vm = new UserVM(new[] { department }); SelectionItemVM <Department> groupVM = vm.Department.AllItems.Single(); Assert.AreEqual(department.Name, groupVM.Caption); }
public void ItemVMs_HaveCorrectCaptions() { Group group = new Group("First group"); UserVM vm = new UserVM(new[] { group }); SelectionItemVM <Group> groupVM = vm.Groups.AllItems.Single(); Assert.AreEqual(group.Name, groupVM.Caption); }
private string GetCaption(SelectionItemVM <PersonStatus> item) { return((string)TypeDescriptor.GetProperties(item)["Caption"].GetValue(item)); }