public async Task ShouldReturnFailedResult_Because_TeachersNotFound() { var command = new FindTeacherCommand(GetNarfuApi(0)); var text = $"{command.Aliases[0]} Петров Пётр Петрович"; var message = GenerateMessage(DefaultUser.Id, DefaultUser.Id, text); var result = await command.Execute(message, DefaultUser); result.Should().BeOfType <FailedResult>(); result.Message.Should().NotBeNullOrEmpty(); result.Keyboard.Should().BeNull(); }
public async Task ShouldReturnSuccessfulResult() { var command = new FindTeacherCommand(GetNarfuApi()); var text = $"{command.Aliases[0]} Иванов Иван Иванович"; var message = GenerateMessage(DefaultUser.Id, DefaultUser.Id, text); var result = await command.Execute(message, DefaultUser); result.Should().BeOfType <SuccessfulResult>(); result.Message.Should().NotBeNullOrEmpty(); result.Keyboard.Should().NotBeNull(); result.Keyboard.Buttons.Should().HaveCount(4); }