ChatterServiceTest.ChatterSqlProceduresTest.TestCreateActivityWithMissingMessageElement C# (CSharp) Method

TestCreateActivityWithMissingMessageElement() private method

private TestCreateActivityWithMissingMessageElement ( ) : void
return void
        public void TestCreateActivityWithMissingMessageElement()
        {
            string xml =
                "<activity xmlns=\"http://ns.opensocial.org/2008/opensocial\"><postedTime>1304533194580</postedTime><body>This is Profiles test activity from ChatterSqlProceduresTest</body></activity>";
            var xmlReader = XmlTextReader.Create(new System.IO.StringReader(xml));

            SqlXml messageBlob = new SqlXml(xmlReader);

            try
            {
                //ChatterSqlProcedures.CreateActivity(_url, _username, _password, _token, _employeeId, messageBlob, _pmid, _title, _body);
                Assert.Fail("CreateActivity method should throw and exception if xml is incorrect");
            }
            catch (Exception ex)
            {
                Assert.AreEqual("Element {http://ns.opensocial.org/2008/opensocial}title was not found", ex.Message);
            }
        }