public async Task ParseTest() { var parser = new NumberParser(); var result = await parser.ParseAsync(null, null, new ChatMessage { UserInput = "56 nutter butter" }); Assert.AreEqual((int)result.Answer, 56); result = await parser.ParseAsync(null, null, new ChatMessage { UserInput = "nutter butter" }); Assert.IsFalse(result.Success); result = await parser.ParseAsync(null, new ChatWeb.Models.Chat_ParseField { RuleData = "{ \"AllowedValues\":\"32 64\" }" }, new ChatMessage { UserInput = "56 nutter butter" }); Assert.IsFalse(result.Success); result = await parser.ParseAsync(null, new ChatWeb.Models.Chat_ParseField { RuleData = "{ \"AllowedValues\":\"32 64\" }" }, new ChatMessage { UserInput = "64gigs" }); Assert.AreEqual((int)result.Answer, 64); }