public void IsAnInstanceOfICommand() { var fakeFactory = new Mock <IBattleShipFactory>(); var fakeEngine = new Mock <IEngine>(); var mockFactory = new FakeCreateSubmarineCommand(fakeFactory.Object, fakeEngine.Object); Assert.IsInstanceOfType(mockFactory, typeof(ICommand)); }
public void SetTheFieldEngine() { //Arrange var fakeFactory = new Mock <IBattleShipFactory>(); var fakeEngine = new Mock <IEngine>(); var mockFactory = new FakeCreateSubmarineCommand(fakeFactory.Object, fakeEngine.Object); //Act & Assert Assert.AreSame(fakeEngine.Object, mockFactory.Engine); }