Created
December 4, 2016 20:17
-
-
Save guitarrapc/a137c143ce8d1f880962d07f4066df97 to your computer and use it in GitHub Desktop.
Should be fail with TestShouldFailFunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Xunit; | |
using Amazon.Lambda.Core; | |
using Amazon.Lambda.TestUtilities; | |
using SimpleAsyncFunction; | |
namespace SimpleAsyncFunction.Tests | |
{ | |
public class FunctionTest | |
{ | |
[Fact] | |
public async Task TestToUpperFunction() | |
{ | |
// Invoke the lambda function and confirm the string was upper cased. | |
var function = new Function(); | |
var context = new TestLambdaContext(); | |
var upperCase = await function.FunctionHandlerAsync("hello world", context); | |
Assert.Equal("HELLO WORLD", upperCase); | |
} | |
[Fact] | |
public async Task TestToLowerFunction() | |
{ | |
// Invoke the lambda function and confirm the string was upper cased. | |
var function = new Function(); | |
var context = new TestLambdaContext(); | |
var upperCase = await function.FunctionHandlerAsync("hello world", context); | |
Assert.NotEqual("hello world", upperCase); | |
} | |
[Fact] | |
public async Task TestShouldFailFunction() | |
{ | |
// Invoke the lambda function and confirm the string was upper cased. | |
var function = new Function(); | |
var context = new TestLambdaContext(); | |
var upperCase = await function.FunctionHandlerAsync("hello world", context); | |
Assert.Equal("hogemoge", upperCase); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment