Skip to content

Instantly share code, notes, and snippets.

@yreynhout
Forked from jen20/Constructortests.cs
Created July 27, 2013 19:08
Show Gist options
  • Save yreynhout/6095928 to your computer and use it in GitHub Desktop.
Save yreynhout/6095928 to your computer and use it in GitHub Desktop.
[Test]
public void ConstructorSucceeeds()
{
var id = new ConcertId(Guid.NewGuid());
new ConstructorScenario(() => Concert.New(id))
.Then(ConcertEvents.Planned(id))
.Assert();
}
[Test]
public void ConstructorThrows()
{
new ConstructorScenario(() => Concert.New(new ConcertId(Guid.NewGuid()), true))
.AssertThrows(new ArgumentException("shouldThrow"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment