Skip to content

Commit 632f1d2

Browse files
Add square-root
1 parent 176d610 commit 632f1d2

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using Xunit;
2+
3+
public class SquareRootTests
4+
{
5+
{{#test_cases}}
6+
[Fact{{#unless @first}}(Skip = "Remove this Skip property to run this test"){{/unless}}]
7+
public void {{method_name path}}()
8+
{
9+
Assert.Equal({{expected}}, SquareRoot.Root({{input.radicand}}));
10+
}
11+
{{/test_cases}}
12+
}

exercises/practice/square-root/SquareRootTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,38 @@
33
public class SquareRootTests
44
{
55
[Fact]
6-
public void Root_of_1()
6+
public void RootOf1()
77
{
88
Assert.Equal(1, SquareRoot.Root(1));
99
}
1010

1111
[Fact(Skip = "Remove this Skip property to run this test")]
12-
public void Root_of_4()
12+
public void RootOf4()
1313
{
1414
Assert.Equal(2, SquareRoot.Root(4));
1515
}
1616

1717
[Fact(Skip = "Remove this Skip property to run this test")]
18-
public void Root_of_25()
18+
public void RootOf25()
1919
{
2020
Assert.Equal(5, SquareRoot.Root(25));
2121
}
2222

2323
[Fact(Skip = "Remove this Skip property to run this test")]
24-
public void Root_of_81()
24+
public void RootOf81()
2525
{
2626
Assert.Equal(9, SquareRoot.Root(81));
2727
}
2828

2929
[Fact(Skip = "Remove this Skip property to run this test")]
30-
public void Root_of_196()
30+
public void RootOf196()
3131
{
3232
Assert.Equal(14, SquareRoot.Root(196));
3333
}
3434

3535
[Fact(Skip = "Remove this Skip property to run this test")]
36-
public void Root_of_65025()
36+
public void RootOf65025()
3737
{
3838
Assert.Equal(255, SquareRoot.Root(65025));
3939
}
40-
}
40+
}

generators/Exercises/Generators/SquareRoot.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)