Beispiel #1
0
        public async Task GetAllDevicesAsync_WhenCalled_ReturnsAllSensors()
        {
            // Arange
            MockSensorRepository.Setup(repository => repository.GetAll(new CancellationToken(false)))
            .ReturnsAsync(GetAllSensorsTest(Fixture));

            // Act
            var sensors = await _sensorService.GetAllAsync(CancellationToken.None);

            // Assert
            Assert.IsAssignableFrom <IEnumerable <Sensor> >(sensors);
            Assert.NotEmpty(sensors);
        }