Ejemplo n.º 1
0
        public async Task TestSimpleKarmaMessage(string filename)
        {
            Activity        testActivity   = GetTestActivityFromFile($@"TestActivities\{filename}.json");
            TeamsKarmaLogic testTeamsLogic = GetTestTeamsKarmaLogic();

            var actual = await testTeamsLogic.GetKarmaResponseTextsAsync(testActivity, default(CancellationToken));

            actual.Should().BeEquivalentTo(new List <string>
            {
                "msteams's karma has decreased to -1"
            }, options => options.WithoutStrictOrdering());
        }
Ejemplo n.º 2
0
        public async Task TestMultipleKarmaSimultaneouslyAsync02()
        {
            Activity        testActivity   = GetTestActivityFromFile(@"TestActivities\TestMultipleKarmaSimultaneouslyAsync02.json");
            TeamsKarmaLogic testTeamsLogic = GetTestTeamsKarmaLogic();

            var actual = await testTeamsLogic.GetKarmaResponseTextsAsync(testActivity, default(CancellationToken));

            actual.Should().BeEquivalentTo(new List <string>
            {
                "<at>Ashley Raba</at>'s karma has increased to 5",
                "\"giving karma to phrases\"'s karma has decreased to -1"
            }, options => options.WithoutStrictOrdering());
        }
Ejemplo n.º 3
0
        public async Task TestMultipleKarmaSimultaneouslyAsync01()
        {
            Activity        testActivity   = GetTestActivityFromFile(@"TestActivities\TestMultipleKarmaSimultaneouslyAsync01.json");
            TeamsKarmaLogic testTeamsLogic = GetTestTeamsKarmaLogic();

            var actual = await testTeamsLogic.GetKarmaResponseTextsAsync(testActivity, default(CancellationToken));

            actual.Should().BeEquivalentTo(new List <string>
            {
                "<at>Chris Pearson</at>'s karma has increased to 1",
                "<at>Serena</at>'s karma has increased to 1",
                "msteams's karma has decreased to -1",
                "\"test message\"'s karma has increased to 1"
            }, options => options.WithoutStrictOrdering());
        }