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
9 changes: 0 additions & 9 deletions .github/workflows/ci.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/run-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 'Run App Nachi, Aidan'

on: [push, pull_request]

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: build
run: dotnet build
- name: run unit tests
run: dotnet test
4 changes: 2 additions & 2 deletions Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ 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)
public static double Power(string baseNum, string exponent)
{
return 0.0;
return Math.Pow(double.Parse(baseNum), double.Parse(exponent));
}
}
6 changes: 3 additions & 3 deletions Tests/UnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ namespace GithubActionsLab;
public class Addition
{
[TestMethod]
public void Add_Valid_Patino()
public void Add_Valid_Patino_Nachi()
{
Assert.AreEqual(3, Program.Add("1", "2"));
Assert.AreEqual(5, Program.Add("3", "2"));
Assert.AreEqual(12, Program.Add("5", "7"));
}

[TestMethod]
public void Add_Invalid_Patino()
public void Add_Invalid_Patino_Nachi()
{
Assert.ThrowsException<FormatException>(() => Program.Add("1", "a"));
Assert.ThrowsException<FormatException>(() => Program.Add("a", "1"));
Assert.ThrowsException<FormatException>(() => Program.Add("a", "a"));
}

[TestMethod]
public void Add_Null_Patino()
public void Add_Null_Patino_Nachi()
{
Assert.ThrowsException<ArgumentNullException>(() => Program.Add("1", null));
Assert.ThrowsException<ArgumentNullException>(() => Program.Add(null, "1"));
Expand Down