Skip to content
Open
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 Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down
6 changes: 3 additions & 3 deletions Tests/UnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ 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"));
Assert.AreEqual(12, Program.Add("5", "7"));
}

[Test]
public void Add_Invalid()
public void Add_InvalidMcElmury()
{
Assert.Throws<FormatException>(() => Program.Add("1", "a"));
Assert.Throws<FormatException>(() => Program.Add("a", "1"));
Assert.Throws<FormatException>(() => Program.Add("a", "a"));
}

[Test]
public void Add_Null()
public void Add_NullMcElmury()
{
Assert.Throws<ArgumentNullException>(() => Program.Add("1", null));
Assert.Throws<ArgumentNullException>(() => Program.Add(null, "1"));
Expand Down