Exemplo n.º 1
0
        public void CreateFileNameReturnsStringTest()
        {
            MetricOptions options = NewOptionsForTest();


            var expectedMetricType = _mtr.GetMetricsByID(1);

            string filename = options.CreateFileName();

            Assert.IsTrue(filename.Contains(expectedMetricType.Abbreviation));
        }
Exemplo n.º 2
0
        public void CreateFileNameCreatesImageDirectory()
        {
            string testDirPath = "C:\\Temp\\ATSPMImages";

            MetricOptions options = NewOptionsForTest();

            options.MetricFileLocation = testDirPath;

            DirectoryInfo di = new DirectoryInfo(testDirPath);

            di.Refresh();

            if (di.Exists)
            {
                Directory.Delete(testDirPath);
            }

            string filename = options.CreateFileName();

            di.Refresh();

            Assert.IsTrue(di.Exists);
        }