Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Extend api to handle bot-user file exchange story #8

Open
mpustelnik opened this issue Mar 4, 2019 · 0 comments
Open

Extend api to handle bot-user file exchange story #8

mpustelnik opened this issue Mar 4, 2019 · 0 comments

Comments

@mpustelnik
Copy link
Contributor

mpustelnik commented Mar 4, 2019

Extend fluent api to allow writing easy test scenarios with files, eg:

public class FilesTests: BotTestBase<DemoBot>
{
    [Fact]
    public async Task UserSendsFile()
    {
        var story = this.Record
            .User.SendsFile(...)
            .Bot.Says("File received")
            .Rewind();

        await this.Play(story);
    }

    [Fact]
    public async Task BotSendsFile()
    {
        var story = this.Record
            .User.Says("Send me a file")
            .Bot.SendsFile(x => ...)
            .Rewind();

        await this.Play(story);
    }
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant