public void Should_Not_have_error_when_User_outside_room_RoomName_ok() { var message = CreateRoomMessageMockData.UserOutsideRoomRoomNameOK().SerializeMessage(); var result = _messageService.HandleRequest(socketId, message); Assert.That(result[0].Event, Is.EqualTo(EventEnum.Error)); }
public void Should_have_error_when_User_is_inside_without_roomname() { var message = CreateRoomMessageMockData.UserInsideRoomWithoutRoomName().SerializeMessage(); var result = _messageService.HandleRequest(socketId, message); Assert.That(result[0].Event, Is.EqualTo(EventEnum.Error)); }
public void Should_have_error_when_Event_is_null() { var message = CreateRoomMessageMockData.EventNull().SerializeMessage(); var result = _messageService.HandleRequest(socketId, message); Assert.That(result[0].Event, Is.EqualTo(EventEnum.Error)); }
public void Should_Not_have_error_when_User_outside_room_RoomName_ok_other_fields() { var message = CreateRoomMessageMockData.UserOutsideRoomRoomNameOKOtherFieldsOK(); validator.ShouldNotHaveValidationErrorFor(x => x.MessageText, message); }
public void Should_have_error_when_User_inside_room_RoomName_ok() { var message = CreateRoomMessageMockData.UserInsideRoomWithRoomName(); validator.ShouldHaveValidationErrorFor(x => x.User.IdActiveRoom, message); }
public void Should_have_error_when_User_outside_room_RoomName_have_special_chars() { var message = CreateRoomMessageMockData.UserOutsideRoomRoomNameSpecialChars(); validator.ShouldHaveValidationErrorFor(x => x.MessageText, message); }
public void Should_have_error_when_User_is_inside_without_roomname() { var message = CreateRoomMessageMockData.UserInsideRoomWithoutRoomName(); validator.ShouldHaveValidationErrorFor(x => x.MessageText, message); }
public void Should_have_error_when_Event_is_null() { var message = CreateRoomMessageMockData.EventNull(); validator.ShouldHaveValidationErrorFor(x => x.Event, message); }