Created
November 20, 2012 04:19
-
-
Save Restuta/4115977 to your computer and use it in GitHub Desktop.
"New" test helper
This file contains hidden or 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
| //What do you thing about usage of "New" class as a test helper | |
| var @event = new ContactCreatedEvent(Guid.NewGuid(), New.ContactDetails()); | |
| // ^^^^^^ | |
| public static class New | |
| { | |
| public static ContactDetails ContactDetails() | |
| { | |
| var contactDetails = new ContactDetails | |
| { | |
| BirthdayTimestamp = new DateTime(1986, 1, 1).Ticks, | |
| Company = "company", | |
| Department = "department", | |
| Email = "email", | |
| JobTitle = "jobTitle", | |
| PhoneNumber = "phone_number", | |
| ProfileImageUrl = "img_url", | |
| Addresses = new List<StreetAddress>() { new StreetAddress() } | |
| }; | |
| return contactDetails; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment