Example #1
0
        public void IsAnInstanceOfICommand()
        {
            var fakeFactory = new Mock <IBattleShipFactory>();
            var fakeEngine  = new Mock <IEngine>();
            var mockFactory = new FakeCreatePlayerCommand(fakeFactory.Object, fakeEngine.Object);

            Assert.IsInstanceOfType(mockFactory, typeof(ICommand));
        }
Example #2
0
        public void SetTheFieldEngine()
        {
            //Arrange
            var fakeFactory = new Mock <IBattleShipFactory>();
            var fakeEngine  = new Mock <IEngine>();
            var mockFactory = new FakeCreatePlayerCommand(fakeFactory.Object, fakeEngine.Object);

            //Act & Assert
            Assert.AreSame(fakeEngine.Object, mockFactory.Engine);
        }