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); } }
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); } }