Created
January 16, 2016 16:01
-
-
Save teamaton/11b88351427d3f8db405 to your computer and use it in GitHub Desktop.
Evolution of object creation code in tests
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
namespace CampingInfo.Core.Setup | |
{ | |
public class CampsiteSetup | |
{ | |
} | |
} |
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
using NUnit.Framework; | |
namespace Tests | |
{ | |
[TestFixture] | |
public class CampsiteTests : BaseTest | |
{ | |
[Test] | |
public void Should_correctly_act_on_campsite_with_custom_properties() | |
{ | |
// Arrange | |
var campsite = _campsiteSetup.Add().LastAdded; | |
campsite.RatingCount = 7; | |
campsite.Price1 = 23.45f; | |
campsite.Caravan = true; | |
_campsiteSetup.Persist(); | |
// Act | |
// Assert | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment