public void CreatesCorrectNumberOfRandomLettersNumbers() { var rnd = new Random(); for (var i = 0; i < 10; i++) { var x = (int)Math.Floor(rnd.Next(1, 30) * 1.0); var values = _valueGenerator.RandomAlphaNumeric(x); Assert.True(values.Count() == x); Assert.True(values.All(char.IsLetterOrDigit)); } }
public void ReturnsRightValue() { for (var i = 0; i < 10; i++) { var value = _generator.RandomAlphaNumeric(30); var node = new LinkedListNode <string> { Value = value }; Assert.AreEqual(node.Value, value); var node2 = new LinkedListNode <int>(i); Assert.AreEqual(node2.Value, i); } }