Created
July 27, 2013 18:37
-
-
Save jen20/6095829 to your computer and use it in GitHub Desktop.
Potential syntax for constructor testing in AggregateSource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void ConstructorSucceeeds() | |
{ | |
var id = new ConcertId(Guid.NewGuid()); | |
new ConstructorScenario() | |
.When(() => Concert.New(id)) | |
.Then(ConcertEvents.Planned(id)) | |
.Assert(); | |
} | |
[Test] | |
public void ConstructorThrows() | |
{ | |
new ConstructorScenario() | |
.When(() => 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