diff --git a/Console/Program.cs b/Console/Program.cs index b3fcdf6a..f0c618ae 100644 --- a/Console/Program.cs +++ b/Console/Program.cs @@ -84,7 +84,7 @@ public static double Divide(string x, string y) // Implement this method following a similar pattern as above public static double Power(string x, string y) { - throw new NotImplementedException(); + return Math.Pow(double.Parse(x), double.Parse(y)); } } diff --git a/Tests/UnitTests.cs b/Tests/UnitTests.cs index 84cde036..9d8efb8e 100644 --- a/Tests/UnitTests.cs +++ b/Tests/UnitTests.cs @@ -7,7 +7,7 @@ namespace TravisCILab public class Math { [Test] - public void Add_Valid() + public void Add_ValidMcElmury() { Assert.AreEqual(3, Program.Add("1", "2")); Assert.AreEqual(5, Program.Add("3", "2")); @@ -15,7 +15,7 @@ public void Add_Valid() } [Test] - public void Add_Invalid() + public void Add_InvalidMcElmury() { Assert.Throws(() => Program.Add("1", "a")); Assert.Throws(() => Program.Add("a", "1")); @@ -23,7 +23,7 @@ public void Add_Invalid() } [Test] - public void Add_Null() + public void Add_NullMcElmury() { Assert.Throws(() => Program.Add("1", null)); Assert.Throws(() => Program.Add(null, "1"));