diff --git a/X10D.Tests/src/Core/CharTests.cs b/X10D.Tests/src/Core/CharTests.cs
index 1f4efe7..e973ceb 100644
--- a/X10D.Tests/src/Core/CharTests.cs
+++ b/X10D.Tests/src/Core/CharTests.cs
@@ -1,4 +1,4 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace X10D.Tests.Core
{
@@ -8,26 +8,17 @@ namespace X10D.Tests.Core
[TestClass]
public class CharTests
{
- ///
- /// Tests for .
- ///
- [TestMethod]
- public void Random()
- {
- var set = "abcdefghijklmnopqrstuvwxyz".ToCharArray();
- var random = set.Random(20);
-
- Assert.IsTrue(random.All(c => Array.IndexOf(set, c) >= 0));
- Assert.IsFalse(random.Any(c => Array.IndexOf(set, c) < -1));
- }
-
- ///
- /// Tests for .
- ///
[TestMethod]
public void Repeat()
{
- Assert.AreEqual("aaaaaaaaaa", 'a'.Repeat(10));
+ const char character = 'a';
+ const int repeatCount = 10;
+
+ const string repeated = "aaaaaaaaaa";
+ var result = character.Repeat(repeatCount);
+
+ Assert.AreEqual(repeated, result);
+ Assert.ThrowsException(() => character.Repeat(-1));
}
}
}