Skip to content

Remove unushed exception in Triangle exercise #768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion exercises/bowling/BowlingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public void Cannot_roll_after_bonus_rolls_for_strike()
Assert.Throws<ArgumentException>(() => sut.Roll(2));
}

public void DoRoll(IEnumerable<int> rolls, BowlingGame sut)
private void DoRoll(IEnumerable<int> rolls, BowlingGame sut)
{
foreach (var roll in rolls)
{
Expand Down
5 changes: 1 addition & 4 deletions exercises/triangle/Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public enum TriangleKind

public static class Triangle
{

public static bool IsScalene(double side1, double side2, double side3)
{
return Kind(side1, side2, side3) == TriangleKind.Scalene;
Expand Down Expand Up @@ -65,6 +64,4 @@ private static int UniqueSides(double side1, double side2, double side3)
double[] sides = { side1, side2, side3 };
return sides.Distinct().Count();
}
}

public class TriangleException : Exception { }
}
5 changes: 1 addition & 4 deletions exercises/triangle/Triangle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@ public static bool IsEquilateral(double side1, double side2, double side3)
{
throw new NotImplementedException("You need to implement this function.");
}

}

public class TriangleException : Exception { }
}
2 changes: 1 addition & 1 deletion generators/Exercises/Generators/Bowling.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected override void UpdateTestClass(TestClass testClass)
private static void AddDoRollMethod(TestClass testClass)
{
testClass.AdditionalMethods.Add(@"
public void DoRoll(IEnumerable<int> rolls, BowlingGame sut)
private void DoRoll(IEnumerable<int> rolls, BowlingGame sut)
{
foreach (var roll in rolls)
{
Expand Down