public void DisagreeingValues() { const string name = "name"; var info = new Mock <IEventInfo> (); info.SetupGet(i => i.Name).Returns(name); var editor = new MockObjectEditor { Events = new[] { info.Object } }; const string handler = "handler"; editor.AttachHandlerAsync(info.Object, handler); var editor2 = new MockObjectEditor { Events = new[] { info.Object } }; editor.AttachHandlerAsync(info.Object, "handler2"); var ev = new EventViewModel(MockEditorProvider.MockPlatform, info.Object, new[] { editor, editor2 }); Assert.That(ev.MethodName, Is.Null); Assert.That(ev.MultipleValues, Is.True); }
public void MethodName() { const string name = "name"; var info = new Mock <IEventInfo> (); info.SetupGet(i => i.Name).Returns(name); var editor = new MockObjectEditor { Events = new[] { info.Object } }; const string handler = "handler"; editor.AttachHandlerAsync(info.Object, handler); var ev = new EventViewModel(MockEditorProvider.MockPlatform, info.Object, new[] { editor }); Assert.That(ev.MethodName, Is.EqualTo(handler)); }