Skip to content

Instantly share code, notes, and snippets.

@teamaton
Created January 16, 2016 16:01
Show Gist options
  • Save teamaton/11b88351427d3f8db405 to your computer and use it in GitHub Desktop.
Save teamaton/11b88351427d3f8db405 to your computer and use it in GitHub Desktop.
Evolution of object creation code in tests
namespace CampingInfo.Core.Setup
{
public class CampsiteSetup
{
}
}
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