public void TestObjectPickerCancel() { ConsoleProvider.Current = new TestConsoleProvider("1 Mic{escape}"); PeoplePicker picker = new PeoplePicker(); var result = picker.Search(); Assert.IsNull(result); }
public void TestObjectPickerCantCancel() { ConsoleProvider.Current = new TestConsoleProvider("1 Mic{escape}{w}"); PeoplePicker picker = new PeoplePicker(); var result = picker.Search(allowCancel: false); Assert.IsInstanceOfType(result.ResultValue, typeof(PeoplePicker.Person)); var person = result.ResultValue as PeoplePicker.Person; Assert.AreEqual("Adam", person.Name); }