Skip to content

Instantly share code, notes, and snippets.

@horsdal
Created July 8, 2012 21:55
Show Gist options
  • Save horsdal/3073080 to your computer and use it in GitHub Desktop.
Save horsdal/3073080 to your computer and use it in GitHub Desktop.
WPF binding smoke test template
[Fact]
public void Tag_is_bound_to_model_on_construction()
{
var model = new MainWindowViewModel(tag: "testing");
var sut = new MainWindow(model);
sut.Show();
var tag = sut.FindName("Tag") as TextBox;
Assert.Equal(model.Tag, tag.Text);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment