예제 #1
0
            public async Task InvalidString_NoMentionTest()
            {
                foreach (var source in InvalidStringTestSource())
                {
                    var m    = TestLazySocketMessage.CreateNoMentionMessage(source);
                    var expr = await Expr.Main.InterpretFromLazySocketMessageAsync(m, TestLazySocketUser.MyBot.Id);

                    Assert.IsTrue(expr.HasValue);
                    AssertInvalid(expr.Value);
                }
            }
예제 #2
0
            public async Task ValidConstant_NoMentionTest()
            {
                foreach ((var source, var expected) in ValidConstantTestSource())
                {
                    var m    = TestLazySocketMessage.CreateNoMentionMessage(source);
                    var expr = await Expr.Main.InterpretFromLazySocketMessageAsync(m, TestLazySocketUser.MyBot.Id);

                    Assert.IsTrue(expr.HasValue);
                    AssertConstant(expr.Value, expected);
                }
            }