B
Berryl Hesh
I wouldn't nomally post this here, as it has something to do with the
ListView control usage I think, or maybe with a race condition or some
windoes messaging. I'm just not sure.
The test below succeeds IF i walk through the debugger and IF I examine the
ListViewItem's properties in the debugger visualizer. Otherwise, it fails.
Any ideas?
Thanks. BH
[Test]
public void SelectedItem_ReturnsFirstTheSelectectedItem() {
_addData();
Assert.That(_listView.Items.Count, Is.GreaterThan(0), "Data added
test");
var listViewItem = _listView.Items[0];
Assert.That(listViewItem, Is.Not.Null);
_listView.Focus();
listViewItem.Selected = true; ---------------XX only if in debug
Assert.That(_listView.SelectedItems.Count, Is.GreaterThan(0), "ListView
not responding to Selected=true");----xx---only if in debug
Assert.That(_widget.SelectedItem, Is.Not.Null, "Point of the test!");
}
ListView control usage I think, or maybe with a race condition or some
windoes messaging. I'm just not sure.
The test below succeeds IF i walk through the debugger and IF I examine the
ListViewItem's properties in the debugger visualizer. Otherwise, it fails.
Any ideas?
Thanks. BH
[Test]
public void SelectedItem_ReturnsFirstTheSelectectedItem() {
_addData();
Assert.That(_listView.Items.Count, Is.GreaterThan(0), "Data added
test");
var listViewItem = _listView.Items[0];
Assert.That(listViewItem, Is.Not.Null);
_listView.Focus();
listViewItem.Selected = true; ---------------XX only if in debug
Assert.That(_listView.SelectedItems.Count, Is.GreaterThan(0), "ListView
not responding to Selected=true");----xx---only if in debug
Assert.That(_widget.SelectedItem, Is.Not.Null, "Point of the test!");
}