KevToTo
Need help
it's my tests :
[Theory]
[InlineData(1,"Moves for 1 disks\n1 -> 3")]
[InlineData(2, "Moves for 2 disks\n1 -> 2\n1 -> 3\n2 -> 3")]
[InlineData(3,"Moves for 3 disks\n1 -> 3\n1 -> 2\n3 -> 2\n1 -> 3\n2 -> 1\n2 -> 3\n1 -> 3")]
[InlineData(4, "Moves for 4 disks\n1 -> 2\n1 -> 3\n2 -> 3\n1 -> 2\n3 -> 1\n3 -> 2\n1 -> 2\n1 -> 3\n2 -> 3\n2 -> 1\n3 -> 1\n2 -> 3\n1 -> 2\n1 -> 3\n2 -> 3")]
[InlineData(5, "Moves for 5 disks\n1 -> 3\n1 -> 2\n3 -> 2\n1 -> 3\n2 -> 1\n2 -> 3\n1 -> 3\n1 -> 2\n3 -> 2\n3 -> 1\n2 -> 1\n3 -> 2\n1 -> 3\n1 -> 2\n3 -> 2\n1 -> 3\n2 -> 1\n2 -> 3\n1 -> 3\n2 -> 1\n3 -> 2\n3 -> 1\n2 -> 1\n2 -> 3\n1 -> 3\n1 -> 2\n3 -> 2\n1 -> 3\n2 -> 1\n2 -> 3\n1 -> 3")]
public void CaesarTowerTest(int n,string expected)
{
Assert.Equal(expected, Circus.CaesarTower(n));
}
[Theory]
[InlineData(1,"Moves for 1 disks\n1 -> 3")]
[InlineData(2, "Moves for 2 disks\n1 -> 2\n1 -> 3\n2 -> 3")]
[InlineData(3,"Moves for 3 disks\n1 -> 3\n1 -> 2\n3 -> 2\n1 -> 3\n2 -> 1\n2 -> 3\n1 -> 3")]
[InlineData(4, "Moves for 4 disks\n1 -> 2\n1 -> 3\n2 -> 3\n1 -> 2\n3 -> 1\n3 -> 2\n1 -> 2\n1 -> 3\n2 -> 3\n2 -> 1\n3 -> 1\n2 -> 3\n1 -> 2\n1 -> 3\n2 -> 3")]
[InlineData(5, "Moves for 5 disks\n1 -> 3\n1 -> 2\n3 -> 2\n1 -> 3\n2 -> 1\n2 -> 3\n1 -> 3\n1 -> 2\n3 -> 2\n3 -> 1\n2 -> 1\n3 -> 2\n1 -> 3\n1 -> 2\n3 -> 2\n1 -> 3\n2 -> 1\n2 -> 3\n1 -> 3\n2 -> 1\n3 -> 2\n3 -> 1\n2 -> 1\n2 -> 3\n1 -> 3\n1 -> 2\n3 -> 2\n1 -> 3\n2 -> 1\n2 -> 3\n1 -> 3")]
public void CaesarTowerTest(int n,string expected)
{
Assert.Equal(expected, Circus.CaesarTower(n));
}
3 replies