Exemple #1
0
        public void InvalidFileShouldThrowException()
        {
            var badFile = Path.Combine(BadPath, @"CALC.EXE-3FBEF7FD.pf");
            Action action = () => OleCf.LoadFile(badFile);

            action.Should().Throw<Exception>().WithMessage("Invalid signature!");
        }
Exemple #2
0
        public void BaseTests()
        {
            foreach (var allPath in _allPaths)
            {
                foreach (var fname in Directory.GetFiles(allPath))
                {
                    Debug.WriteLine(fname);
                    var o = OleCf.LoadFile(fname);

                    o.Header.Should().NotBeNull();

                    Debug.WriteLine(o.Header);

                    Debug.WriteLine($"Directory items. total: {o.Directory.Count}");
                    foreach (var directoryItem in o.Directory)
                    {
                        directoryItem.DirectoryName.Should().NotBeNullOrEmpty();

                        Debug.WriteLine(
                            $"Name: {directoryItem.DirectoryName}, Size: {directoryItem.DirectorySize}, Type: {directoryItem.DirectoryType}");
                    }

                    Debug.WriteLine("");
                }
            }
        }
Exemple #3
0
        public void OneOff()
        {
            var o =OleCf.LoadFile(@"C:\Temp\f01b4d95cf55d32a.automaticDestinations-ms");
         //   var o =OleCf.LoadFile(@"C:\Temp\5f7b5f1e01b83767.automaticDestinations-ms");


            var destList = o.Directory.SingleOrDefault(t => t.DirectoryName.ToLowerInvariant() == "destlist");
            var foo = o.GetPayloadForDirectory(destList);

            Debug.WriteLine(o.Directory.Count);
        }
Exemple #4
0
        public void OneOff()
        {
            var o =
                OleCf.LoadFile(@"C:\Users\e\Desktop\testjl\5d696d521de238c3.automaticDestinations-ms");


            var destList = o.Directory.SingleOrDefault(t => t.DirectoryName.ToLowerInvariant() == "destlist");
            var foo      = o.GetPayloadForDirectory(destList);

            Debug.WriteLine(o.Directory.Count);
        }