public void NextInt_Fake_ValueEquals20() { //Arrange FakeRandomNumberGenerator rnd = new FakeRandomNumberGenerator(); //Act int result = rnd.NextInt(0, 100); //Assert Assert.That(result == 20); }
public void GetRandomSquare_FakeGenerator_ValueEquals20() { //Arrange FakeRandomNumberGenerator rnd = new FakeRandomNumberGenerator(); Form1 form = new Form1(); //Act Rectangle rect = form.GetRandomSquare(rnd); //Assert Assert.That(rect.Location == new Point(20, 20) && rect.Size == new Size(20, 20)); }