예제 #1
0
        public void New_Creates_Message_Stanza_With_Provided_Type()
        {
            var expectedType = Guid.NewGuid().ToString();
            var stanza       = MessageStanza.New(expectedType);

            Assert.Equal("message", stanza.Name);
            Assert.Equal(expectedType, stanza.Type());
        }
예제 #2
0
        public void New_Creates_Message_Stanza_With_Provided_Body()
        {
            var expectedBody = Guid.NewGuid().ToString();
            var stanza       = MessageStanza.New(MessageStanza.Type.Error, null, expectedBody);

            var actualBody = stanza.Child("body").Value;

            Assert.Equal(expectedBody, actualBody);
        }
예제 #3
0
        public void New_Creates_Message_Stanza_With_Provided_Subject()
        {
            var expectedSubject = Guid.NewGuid().ToString();
            var stanza          = MessageStanza.New(MessageStanza.Type.Chat, expectedSubject);

            var actualSubject = stanza.Child("subject").Value;

            Assert.Equal(expectedSubject, actualSubject);
        }