Skip to content

Instantly share code, notes, and snippets.

@shadow1349
Created August 23, 2019 17:17
Show Gist options
  • Save shadow1349/feda163e28b59718348972214d69e72b to your computer and use it in GitHub Desktop.
Save shadow1349/feda163e28b59718348972214d69e72b to your computer and use it in GitHub Desktop.
Grader service tests
using NUnit.Framework;
using Grader.Service;
namespace Tests
{
public class Tests
{
private GradeConverter gc = new GradeConverter();
[TestCase(90)]
[TestCase(91)]
[TestCase(95)]
[TestCase(100)]
[TestCase(101)]
public void ShouldGetA(int value)
{
Assert.AreEqual('A', gc.GetLetterGrade(value));
}
[TestCase(80)]
[TestCase(81)]
[TestCase(89)]
public void ShouldGetB(int value)
{
Assert.AreEqual('B', gc.GetLetterGrade(value));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment