コード例 #1
0
        public void HoverCommand_ShouldExecuteClientMoveDown()
        {
            // arrange
            moveDownCommand = new MoveDownCommand(DroneClientMock.Object);

            // act
            moveDownCommand.Execute();

            // assert
            DroneClientMock.Verify(x => x.MoveDown(), Times.Once);
        }
コード例 #2
0
ファイル: StopCommandTests.cs プロジェクト: 4ndreij/icarus
        public void HoverCommand_ShouldExecuteClientStop()
        {
            // arrange
            stopCommand = new StopCommand(DroneClientMock.Object);

            // act
            stopCommand.Execute();

            // assert
            DroneClientMock.Verify(x => x.Stop(), Times.Once);
        }
コード例 #3
0
ファイル: HoverCommandTests.cs プロジェクト: 4ndreij/icarus
        public void HoverCommand_ShouldExecuteClientHover()
        {
            // arrange
            hoverCommand = new HoverCommand(DroneClientMock.Object);

            // act
            hoverCommand.Execute();

            // assert
            DroneClientMock.Verify(x => x.Hover(), Times.Once);
        }
コード例 #4
0
        public void ConfigureCommand_ShouldExecuteClientConfigure()
        {
            // arrange
            var droneConfiguration = new DroneConfiguration.DroneConfiguration();

            configureCommand = new ConfigureCommand(DroneClientMock.Object);

            // act
            configureCommand.SetConfiguration(droneConfiguration);
            configureCommand.Execute();

            // assert
            DroneClientMock.Verify(x => x.Configure(droneConfiguration), Times.Once);
        }