コード例 #1
0
ファイル: SetUp.cs プロジェクト: dfberry/WAZDashboard
        /// <summary>
        /// Pull Html file from Windows Azure only once, store it,
        /// save file name.
        /// </summary>
        /// <returns>filename as string</returns>
        public static string RunBeforeTests_IssueListFile()
        {
            HttpContextBase httpContext = null;
            IssueMgr issueMgr = new IssueMgr(httpContext);

            issueMgr.SetRssIssuesFromUri(GetDataPath());

            return string.Empty;
        }
コード例 #2
0
ファイル: IssueMgrTest.cs プロジェクト: dfberry/WAZDashboard
        public void SetRssIssuesFromUriTest()
        {
            // arrange
            Setup.RunBeforeTests_FeedListFile();

            HttpContextBase context = null;
            string pathToFiles = Setup.GetDataPath();
            IssueMgr issueMgr = new IssueMgr(context);
            IssueConfiguration issueConfig = new IssueConfiguration(context);

            if (File.Exists(pathToFiles + issueConfig.SerializedIssueListFile))
            {
                File.Delete(pathToFiles + issueConfig.SerializedIssueListFile);
            }

            // act
            issueMgr.SetRssIssuesFromUri(pathToFiles);

            // assert
            Assert.IsTrue(File.Exists(pathToFiles + issueConfig.SerializedIssueListFile));

            // cleanup
            File.Delete(pathToFiles + issueConfig.SerializedIssueListFile);
        }