Example #1
0
        public async Task get_all_measurements()
        {
            // Arrange
            var repository = MeasurementContextMocker.GetInMemoryMeasurementsRepository(nameof(get_all_measurements));
            var controller = new MeasurementController(repository);

            // Act
            var response = await controller.GetAll() as ObjectResult;

            var measurements = response.Value as List <Measurement>;

            // Assert
            Assert.Equal(200, response.StatusCode);
            Assert.Equal(5, measurements.Count);
        }