public void SetRecieverShouldHaveRecievers(Mock <LocationValidator> validator, Location location, Direction direction, Mock <IRover> rover, Mock <IPlateu> plateu) { var sut = new LandingCommand(validator.Object, location, direction); Action actual = () => sut.SetReceivers(rover.Object, plateu.Object); actual.Should().NotThrow <System.Exception>(); }
public void SetRecieversAndExecuteShouldFireRoverLand(Mock <LocationValidator> validator, Location location, Direction direction, [Frozen] Mock <IRover> rover, [Frozen] Mock <IPlateu> plateu) { var sut = new LandingCommand(validator.Object, location, direction); sut.SetReceivers(rover.Object, plateu.Object); sut.Execute(); rover.Verify(p => p.Land(plateu.Object, location, direction), Times.Once); }