Esempio n. 1
0
        public void CreateTraceSyndicationFeedTest()
        {
            SyndicationFeed actual = WcfTraceService_Accessor.CreateTraceSyndicationFeed();

            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Title.Text == "WCF RIA Service Traces");
        }
Esempio n. 2
0
        public void CreateTraceXmlTest()
        {
            Stream actual = WcfTraceService_Accessor.CreateTraceXml();

            Assert.IsNotNull(actual);
            XElement root = XElement.Load(actual);

            Assert.IsTrue(root.Name.LocalName == "Traces");
        }
Esempio n. 3
0
        public void CreateTraceSyndicationItemTest()
        {
            SyndicationItem actual = WcfTraceService_Accessor.CreateTraceSyndicationItem(this.CreateSampleTraceEntry());

            Assert.IsNotNull(actual);
            Assert.IsTrue(actual.Title.Text == "Information: Security Impersonation succeeded at the server.");
            Assert.IsTrue(actual.PublishDate == new DateTimeOffset(634052379151696992, TimeSpan.Zero));
            Assert.IsTrue(actual.LastUpdatedTime == actual.PublishDate);
        }
Esempio n. 4
0
        public void CreateTraceHtmlTest()
        {
            Stream actual = WcfTraceService_Accessor.CreateTraceHtml();

            Assert.IsNotNull(actual);
            MemoryStream ms = new MemoryStream();

            actual.CopyTo(ms);
            string html = Encoding.UTF8.GetString(ms.ToArray());

            Assert.IsTrue(html.StartsWith("<html>", StringComparison.OrdinalIgnoreCase));
            Assert.IsTrue(html.EndsWith("</html>", StringComparison.OrdinalIgnoreCase));
        }