Skip to content

Instantly share code, notes, and snippets.

@djhmateer
Created January 25, 2016 22:06
Show Gist options
  • Select an option

  • Save djhmateer/febed2e55dfecb899585 to your computer and use it in GitHub Desktop.

Select an option

Save djhmateer/febed2e55dfecb899585 to your computer and use it in GitHub Desktop.
some tests
[Fact]
public void OneToFive()
{
var result = DivideUp(7);
// if 1,2,3,4,5
Assert.Equal(new List<int> { 1, 5, 3, 4, 2 }, result);
}
[Fact]
public void OneToSeven()
{
var result = DivideUp(7);
// if 1,2,3,4,5,6,7
Assert.Equal(new List<int> { 1, 7, 4, 5, 2, 6, 3 }, result);
}
[Fact]
public void OneToEight()
{
var result = DivideUp(8);
// if 1,2,3,4,5,6,7,8
Assert.Equal(new List<int> { 1, 8, 4, 6, 2, 7, 5, 3 }, result);
}
[Fact]
public void OneToNine()
{
var result = DivideUp(9);
// if 1,2,3,4,5,6,7,8,9
Assert.Equal(new List<int> { 1, 9, 5, 7, 3, 8, 6, 4, 2 }, result);
}
[Fact]
public void OneToEleven()
{
var result = DivideUp(11);
// if 1,2,3,4,5,6,7,8,9,10,11
Assert.Equal(new List<int> { 1, 11, 6, 8, 3, 9, 7, 4, 2, 10, 5 }, result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment