Question #170909 on NUnit Framework changed:
https://answers.launchpad.net/nunit-3.0/+question/170909

Description changed to:
I have an nUnit test case that asserts the dynamic that was returned
from Facebook C# SDK. Is there any way how to assert it using NUnit
fluent syntax. Here is very *simplified* example for what I'm looking
for:

// not working
var client = new FacebookClient(accessToken);
dynamic userInfo = client.Get("me");
Assert.That(userInfo, Is.Not.Null);
Assert.That(userInfo, Has.Property("id").Not.Null);
Assert.That(userInfo, Has.Property("name").Not.Null);

Right now I can only test by specifying 'properties' directly

// working, but not fluent
var client = new FacebookClient(accessToken);
dynamic userInfo = client.Get("me");
Assert.That(userInfo, Is.Not.Null);
Assert.That(userInfo.id, Is.Not.Null);
Assert.That(userInfo.name, Is.Not.Null);

Thanks for your answers.

-- 
You received this question notification because you are a member of
NUnit Core Developers, which is an answer contact for NUnit Framework.

_______________________________________________
Mailing list: https://launchpad.net/~nunit-core
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~nunit-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to