Пример #1
0
        public void GetDownloadProgressInPercent_AfterConstruction_ShouldBeZero()
        {
            // Arrange
            var service = new ConnectionStateService(_serviceProviderMock.Object);

            // Act
            int downloadProgressInPercent = service.GetDownloadProgressInPercent();

            // Assert
            downloadProgressInPercent.Should().Be(0);
        }
Пример #2
0
        public async Task UpdateStateAndDownloadProgress_ShouldUpdateStateAndDownloadProgress()
        {
            // Arrange
            var service = new ConnectionStateService(_serviceProviderMock.Object);

            // Act
            await service.UpdateStateAndDownloadProgress(ConnectionState.Downloading, 12);

            // Assert
            service.GetState().Should().Be(ConnectionState.Downloading);
            service.GetDownloadProgressInPercent().Should().Be(12);
        }