BloomTests.Collection.ShortcutMakerTests.CreateDirectoryShortcut C# (CSharp) Method

CreateDirectoryShortcut() private method

private CreateDirectoryShortcut ( ) : void
return void
        public void CreateDirectoryShortcut()
        {
            using (var targetPath = new SIL.TestUtilities.TemporaryFolder(Path.GetRandomFileName()))
            using (var directory = new SIL.TestUtilities.TemporaryFolder(Path.GetRandomFileName()))
            {
                ShortcutMaker.CreateDirectoryShortcut(targetPath.Path, directory.Path);

                var expectedFile = Path.Combine(directory.Path, Path.GetFileName(targetPath.Path)) + ".lnk";
                Assert.That(File.GetAttributes(expectedFile) & (FileAttributes.Directory | FileAttributes.Normal), Is.Not.Null);
                Assert.That(ResolveShortcut.Resolve(expectedFile), Is.EqualTo(targetPath.Path));
            }
        }