예제 #1
0
        public void GetHtml()
        {
            // arrange
            int lastKnownLength = 300000;
            HttpContextBase httpContext = null;

            UriDatasource uriDatasource = new UriDatasource(null, httpContext);
            FeedConfiguration config = new FeedConfiguration(null);
            DashboardHttp http = new DashboardHttp(new Uri(config.AzureUri));
            uriDatasource.DashboardHttp = http;

            // act
            string actual = uriDatasource.GetHtml();

            // save to file
            File.WriteAllText("Html_" + DateTime.Now.Ticks + ".html", actual);

            // assert

            // if this length is wrong then the file Azure returns
            // has changed since the last test
            Assert.IsTrue(lastKnownLength <= actual.Length);
        }