public void GivenConstructorIsCalled_WhenErrorMessageIsNull_ConstructionSucceeds() { var result = new JoinSessionResponse("SessionId"); Assert.NotNull(result); Assert.False(result.Success); Assert.Null(result.ErrorMessage); }
public void GivenCOnstructorIsCalled_WhenPArametersAreValid_ThenFieldsAreMappedAsExcepted() { var sessionId = "1234"; var errorMessage = "Something bad happened"; var result = new JoinSessionResponse(sessionId, errorMessage); Assert.NotNull(result); Assert.False(result.Success); Assert.Equal(sessionId, result.SessionId); Assert.Equal(errorMessage, result.ErrorMessage); }
public void GivenConstructorIsCalled_WhenArgumentsPassedAreValid_ThenValuesAreMappedCorrectly() { var sessionId = "12345"; var userId = "98765"; var userToken = "19283746"; var result = new JoinSessionResponse(sessionId, userId, userToken); Assert.NotNull(result); Assert.True(result.Success); Assert.Equal(sessionId, result.SessionId); Assert.Equal(userId, result.UserId); Assert.Equal(userToken, result.UserToken); Assert.Null(result.ErrorMessage); }