Beispiel #1
0
            public void ExIsSteamClientApiExceptionAndResultIsNotTransient_ReturnsFalse()
            {
                // Arrange
                var ex = new SteamClientApiException(null, EResult.AccessDenied);

                // Act
                var isTransient = SteamClientApiClient.IsTransient(ex);

                // Assert
                Assert.False(isTransient);
            }
Beispiel #2
0
            public void ExIsSteamClientApiExceptionAndResultIsNull_ReturnsTrue()
            {
                // Arrange
                var ex = new SteamClientApiException(null, new TaskCanceledException());

                // Act
                var isTransient = SteamClientApiClient.IsTransient(ex);

                // Assert
                Assert.True(isTransient);
            }
Beispiel #3
0
            public void ExIsSteamClientApiExceptionAndResultIsTransient_ReturnsTrue(EResult result)
            {
                // Arrange
                var ex = new SteamClientApiException(null, result);

                // Act
                var isTransient = SteamClientApiClient.IsTransient(ex);

                // Assert
                Assert.True(isTransient);
            }
Beispiel #4
0
            public void ReturnsSteamClientApiException()
            {
                // Arrange
                var message = "myMessage";

                // Act
                var ex = new SteamClientApiException(message);

                // Assert
                Assert.IsAssignableFrom <SteamClientApiException>(ex);
            }
Beispiel #5
0
            public void ReturnsSteamClientApiException()
            {
                // Arrange
                var message = "myMessage";
                var result  = EResult.AccessDenied;

                // Act
                var ex = new SteamClientApiException(message, result);

                // Assert
                Assert.IsAssignableFrom <SteamClientApiException>(ex);
            }
Beispiel #6
0
            public void SetsResult()
            {
                // Arrange
                var message = "myMessage";
                var result  = EResult.AccessDenied;

                // Act
                var ex = new SteamClientApiException(message, result);

                // Assert
                Assert.Equal(result, ex.Result);
            }