lambda-dotnet-console/test/lambda-dotnet-console.Tests/FunctionTest.cs

29 lines
704 B
C#
Raw Permalink Normal View History

2018-12-10 12:49:31 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
using Amazon.Lambda.TestUtilities;
using lambda_dotnet_console;
2018-12-10 13:58:31 +00:00
using Xunit;
2018-12-10 12:49:31 +00:00
namespace lambda_dotnet_console.Tests
{
public class FunctionTest
{
[Fact]
public void TestToUpperFunction()
{
// Invoke the lambda function and confirm the string was upper cased.
var function = new Function();
var context = new TestLambdaContext();
var upperCase = function.FunctionHandler("hello world", context);
2018-12-10 13:58:31 +00:00
Assert.Equal("TestHELLO WORLD", upperCase);
2018-12-10 12:49:31 +00:00
}
}
2018-12-10 13:58:31 +00:00
}