tracks/csharp/exercises/run-length-encoding/RunLengthEncodingTest.cs in trackler-2.0.8.14 vs tracks/csharp/exercises/run-length-encoding/RunLengthEncodingTest.cs in trackler-2.0.8.15
- old
+ new
@@ -1,66 +1,60 @@
-using NUnit.Framework;
+using Xunit;
public class RunLengthEncodingTest
{
- [Test]
+ [Fact]
public void Encode_simple()
{
const string input = "AABBBCCCC";
const string expected = "2A3B4C";
- Assert.That(RunLengthEncoding.Encode(input), Is.EqualTo(expected));
+ Assert.Equal(expected, RunLengthEncoding.Encode(input));
}
- [Ignore("Remove to run test")]
- [Test]
+ [Fact(Skip = "Remove to run test")]
public void Decode_simple()
{
const string input = "2A3B4C";
const string expected = "AABBBCCCC";
- Assert.That(RunLengthEncoding.Decode(input), Is.EqualTo(expected));
+ Assert.Equal(expected, RunLengthEncoding.Decode(input));
}
- [Ignore("Remove to run test")]
- [Test]
+ [Fact(Skip = "Remove to run test")]
public void Encode_with_single_values()
{
const string input = "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB";
const string expected = "12WB12W3B24WB";
- Assert.That(RunLengthEncoding.Encode(input), Is.EqualTo(expected));
+ Assert.Equal(expected, RunLengthEncoding.Encode(input));
}
- [Ignore("Remove to run test")]
- [Test]
+ [Fact(Skip = "Remove to run test")]
public void Decode_with_single_values()
{
const string input = "12WB12W3B24WB";
const string expected = "WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWWWWWWWWWWWWWWWWWWWWB";
- Assert.That(RunLengthEncoding.Decode(input), Is.EqualTo(expected));
+ Assert.Equal(expected, RunLengthEncoding.Decode(input));
}
- [Ignore("Remove to run test")]
- [Test]
+ [Fact(Skip = "Remove to run test")]
public void Encode_and_then_decode()
{
const string input = "zzz ZZ zZ";
const string expected = "zzz ZZ zZ";
- Assert.That(RunLengthEncoding.Decode(RunLengthEncoding.Encode(input)), Is.EqualTo(expected));
+ Assert.Equal(expected, RunLengthEncoding.Decode(RunLengthEncoding.Encode(input)));
}
- [Ignore("Remove to run test")]
- [Test]
+ [Fact(Skip = "Remove to run test")]
public void Encode_unicode()
{
const string input = "⏰⚽⚽⚽⭐⭐⏰";
const string expected = "⏰3⚽2⭐⏰";
- Assert.That(RunLengthEncoding.Encode(input), Is.EqualTo(expected));
+ Assert.Equal(expected, RunLengthEncoding.Encode(input));
}
- [Ignore("Remove to run test")]
- [Test]
+ [Fact(Skip = "Remove to run test")]
public void Decode_unicode()
{
const string input = "⏰3⚽2⭐⏰";
const string expected = "⏰⚽⚽⚽⭐⭐⏰";
- Assert.That(RunLengthEncoding.Decode(input), Is.EqualTo(expected));
+ Assert.Equal(expected, RunLengthEncoding.Decode(input));
}
}
\ No newline at end of file