public void Test1() { XmppXElement xmpp1 = XmppXElement.LoadXml(XML1); xmpp1.ShouldBeOfType <Note>(); var note = xmpp1 as Note; if (note != null) { note.Value.ShouldBe(VALUE); note.Value.ShouldNotBe("dummy"); note.Type.ShouldBe(NoteType.Info); note.Type.ShouldNotBe(NoteType.Error); note.Type.ShouldNotBe(NoteType.Warn); } }
public void Test1() { XmppXElement xmpp1 = XmppXElement.LoadXml(XML1); xmpp1.ShouldBeOfType <Actions>(); var actions = xmpp1 as Actions; if (actions != null) { actions.Execute.ShouldBe(Matrix.Xmpp.AdHocCommands.Action.Complete); actions.Execute.ShouldNotBe(Matrix.Xmpp.AdHocCommands.Action.Execute); actions.Execute.ShouldNotBe(Matrix.Xmpp.AdHocCommands.Action.None); actions.Previous.ShouldBeTrue(); actions.Complete.ShouldBeTrue(); actions.Next.ShouldBeFalse(); actions.Action.ShouldBe(Matrix.Xmpp.AdHocCommands.Action.Complete | Matrix.Xmpp.AdHocCommands.Action.Prev); } }