public void Create_PositionFactoryNull_Throws_ArgumentNullException() { // Arrange IPosition[] relativePositions = new IPosition[0]; PositionFactory positionFactory = null; var sut = new MovementsFactory(); // Act Action act = () => sut.Create(relativePositions, positionFactory); // Assert Assert.Throws <ArgumentNullException>(act); }
public void Create() { // Arrange var relativePositions = new IPosition[0]; var positionFactory = new PositionFactory(); var sut = new MovementsFactory(); // Act var result = sut.Create(relativePositions, positionFactory); // Assert Assert.Equal(relativePositions, result.RelativePositions); Assert.Equal(positionFactory, result.PositionFactory); }