Skip to content

Instantly share code, notes, and snippets.

@michaelbudnik
Created April 6, 2018 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelbudnik/33f3dd39df038ba1d02f01dc9659002b to your computer and use it in GitHub Desktop.
Save michaelbudnik/33f3dd39df038ba1d02f01dc9659002b to your computer and use it in GitHub Desktop.
Expression vs Func compile time error
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="FakeItEasy" version="4.5.1" targetFramework="net461" />
<package id="Mandrill" version="2.4.1.0" targetFramework="net461" />
<package id="Newtonsoft.Json" version="6.0.6" targetFramework="net461" />
</packages>
using FakeItEasy;
using Mandrill;
using Mandrill.Requests.Messages;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
{
var mandrill = A.Fake<IMandrillApi>();
A.CallTo(() => mandrill.SendMessageTemplate(A<SendMessageTemplateRequest>.That.Matches(
x => x.Message.GlobalMergeVars[0].Content == 0, "testing"))).MustHaveHappened();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment