コード例 #1
0
        public void DirectoryDefaultsToTemp()
        {
            // Create the file download location with default locations.
            var fileDownloadLocation = new Extensions.FileDownloadLocation();

            // Ensure that the parent directory of the directory is the system temporary path.
            Assert.AreEqual
            (
                System.IO.Path.GetTempPath(),
                fileDownloadLocation?.Directory?.Parent?.FullName + @"\"
            );
        }
コード例 #2
0
        public void DirectoryDefaultsToCurrentAssemblyName()
        {
            // Create the file download location with default locations.
            var fileDownloadLocation = new Extensions.FileDownloadLocation();

            // Ensure that the parent directory of the directory is the name of the currently executing assembly.
            Assert.AreEqual
            (
                System.Reflection.Assembly.GetExecutingAssembly().GetName().Name,
                fileDownloadLocation?.Directory?.Name
            );
        }
コード例 #3
0
        public void CustomDirectoryInformationIsCorrect()
        {
            // Create the file download location with default locations.
            var fileDownloadLocation = new Extensions.FileDownloadLocation
                                       (
                @"C:\temp\",
                "subfolder"
                                       );

            // Ensure that directory information is correct.
            Assert.AreEqual
            (
                @"C:\temp\",
                fileDownloadLocation?.Directory?.Parent?.FullName + @"\"
            );
            Assert.AreEqual
            (
                "subfolder",
                fileDownloadLocation?.Directory?.Name
            );
        }