public void test_random_nextInteger_maxValue() { MockRandomImpl mock_random = new MockRandomImpl(); Assert.That(mock_random.next(10), Is.EqualTo(5)); Assert.That(mock_random.next(3), Is.EqualTo(3)); }
public void test_random_nextBytes() { MockRandomImpl mock_random = new MockRandomImpl(); byte[] bytes = new byte[10]; mock_random.nextBytes(bytes); for (int i = 0; i < 10; ++i) { Assert.That(bytes[i] == (byte)i); } }
public void test_random_nextDouble() { MockRandomImpl mock_random = new MockRandomImpl(); Assert.That(mock_random.nextDouble(), Is.EqualTo(5.0)); }
public void test_random_ToString() { MockRandomImpl mock_random = new MockRandomImpl(); Assert.That(mock_random.GetType().ToString(), Is.EqualTo(mock_random.ToString())); }
public void test_random_nextInteger() { MockRandomImpl mock_random = new MockRandomImpl(); Assert.That(mock_random.next(), Is.EqualTo(5)); }