lambda-contact-form/test/ContactForm.Tests/FunctionTest.cs
2018-12-12 09:47:36 +00:00

29 lines
No EOL
684 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Amazon.Lambda.Core;
using Amazon.Lambda.TestUtilities;
using ContactForm;
using Xunit;
namespace ContactForm.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);
Assert.Equal("TestHELLO WORLD", upperCase);
}
}
}