using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Xunit; using Amazon.Lambda.TestUtilities; using Amazon.Lambda.SNSEvents; using BlueprintBaseName._1; namespace BlueprintBaseName._1.Tests { public class FunctionTest { [Fact] public async Task TestSQSEventLambdaFunction() { var snsEvent = new SNSEvent { Records = new List { new SNSEvent.SNSRecord { Sns = new SNSEvent.SNSMessage() { Message = "foobar" } } } }; var logger = new TestLambdaLogger(); var context = new TestLambdaContext { Logger = logger }; var function = new Function(); await function.FunctionHandler(snsEvent, context); Assert.Contains("Processed record foobar", logger.Buffer.ToString()); } } }