public void CpuReturnsRandNumberInCorrectInterval() { int min = 10; int max = 100; var ram = new Ram(8); var cpu = new Cpu(2, 32, ram); cpu.Rand(min, max); var actual = ram.LoadValue(); Assert.IsTrue(min <= actual && actual < max); }
public void CpuRandShouldThrowIfMinLessThanMax() { var cpu = new Cpu(2, 32, new Ram(8)); cpu.Rand(100, 10); }