Skip to content

Instantly share code, notes, and snippets.

@cbrammer

cbrammer/test.cs Secret

Created May 27, 2016 16:15
Show Gist options
  • Save cbrammer/bf5820cd1cd9be8d07c65daa3402c0ca to your computer and use it in GitHub Desktop.
Save cbrammer/bf5820cd1cd9be8d07c65daa3402c0ca to your computer and use it in GitHub Desktop.
using NUnit.Framework;
using System;
using MvvmCross.FieldBinding;
using System.Threading.Tasks;
namespace Bindings
{
[TestFixture ()]
public class Test
{
[Test ()]
public async Task TestCase ()
{
var changedEventTriggered = false;
var item = new NC<int> ();
item.Changed += (sender, e) => {
changedEventTriggered = true;
};
item.Value = 2;
await Task.Delay (100); // For good measure
Assert.IsTrue (changedEventTriggered);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment