public void Test_UpdateStation_ReturnsNotFoundResult()
        {
            // Arrange
            var mockRepo   = new Mock <IMongoDataRepository <Station> >();
            var mockHub    = new Mock <IHubContext <LiveStationHub> >();
            var controller = new StationsController(mockRepo.Object, mockHub.Object, Mapper);

            // Act
            var notFoundResult = controller.UpdateStation(ObjectId.GenerateNewId().ToString(), (StationCreateDto)null);

            // Assert
            Assert.IsType <NotFoundResult>(notFoundResult.Result);
        }
        public void Test_UpdateStation_ReturnsOkResult()
        {
            // Arrange
            var mockRepo = new Mock <IMongoDataRepository <Station> >();

            double[] position = new double[] { 30.2, 50.3 };
            Station  station  = this.Mock.MockStation(position);

            station.Id        = ObjectId.GenerateNewId();
            station.CreatedAt = station.UpdatedAt = DateTime.UtcNow;

            mockRepo.Setup(repo => repo.GetObjectByIdAsync(station.Id.ToString()))
            .Returns(Task.FromResult(station));

            var mockHub    = new Mock <IHubContext <LiveStationHub> >();
            var controller = new StationsController(mockRepo.Object, mockHub.Object, Mapper);

            // Act
            var okResult = controller.UpdateStation(station.Id.ToString(), this.Mapper.Map <StationCreateDto>(station));

            // Assert
            Assert.IsType <OkObjectResult>(okResult.Result);
            Assert.IsType <StationReadDto>((okResult.Result as OkObjectResult).Value);
        }