public void Should_have_error_when_User_outside_room() { var message = MessagingMessageMockData.UserOutsideRoomWithouMessage().SerializeMessage(); var result = _messageService.HandleRequest(socketId, message); Assert.That(result[0].Event, Is.EqualTo(EventEnum.Error)); }
public void Should_Not_have_error_when_User_inside_room_with_message_numbers() { var message = MessagingMessageMockData.UserInsideRoomWithMessageNumbersOK().SerializeMessage(); var result = _messageService.HandleRequest(socketId, message); Assert.That(result[0].Event, Is.EqualTo(EventEnum.Error)); }
public void Should_have_error_when_Message_with_user_is_null() { var message = MessagingMessageMockData.MessageWithouUser().SerializeMessage(); var result = _messageService.HandleRequest(socketId, message); Assert.That(result[0].Event, Is.EqualTo(EventEnum.Error)); }
public void Should_Not_have_error_when_User_inside_room_with_message_special_chars() { var message = MessagingMessageMockData.UserInsideRoomWithMessageSpecialCharOK(); validator.ShouldNotHaveValidationErrorFor(x => x.MessageText, message); }
public void Should_have_error_when_user_inside_room_message_201_chars() { var message = MessagingMessageMockData.UserInsideRoomWithMessage201Chars(); validator.ShouldHaveValidationErrorFor(x => x.MessageText, message); }
public void Should_have_error_when_User_outside_room_with_message() { var message = MessagingMessageMockData.UserOutsideRoomWithMessage(); validator.ShouldHaveValidationErrorFor(x => x.User.IdActiveRoom, message); }
public void Should_have_error_when_Message_with_user_is_null() { var message = MessagingMessageMockData.MessageWithouUser(); validator.ShouldHaveValidationErrorFor(x => x.User, message); }
public void Should_have_error_when_Event_is_null() { var message = MessagingMessageMockData.EventNull(); validator.ShouldHaveValidationErrorFor(x => x.Event, message); }
public void Should_Not_have_error_when_User_inside_room_other_fields() { var message = MessagingMessageMockData.UserInsideRoomWithMessageOtherFieldsOK(); validator.ShouldNotHaveValidationErrorFor(x => x.MessageText, message); }