public void RelativeFolder_Theory(FolderArgs args)
 {
     if (args.Expected == null)
     {
         Trap.Exception(() => new RelativeFolderPath(args.Source))
         .ShouldNotBeNull();
     }
     else
     {
         var folder = new RelativeFolderPath(args.Source);
         folder.ToString()
         .ShouldEqual(args.Expected);
     }
 }
Exemple #2
0
            public void SubtractAbsoluteFile_Theory(TheoryArgs args)
            {
                AbsoluteFolderPath finish = args.LeftPath;
                AbsoluteFilePath   start  = args.RightPath;

                if (args.ExpectedPath == null)
                {
                    Trap.Exception(() => { var _ = finish - start; })
                    .ShouldNotBeNull();
                }
                else
                {
                    RelativeFolderPath relative = finish - start;
                    relative.ToString()
                    .ShouldEqual(args.ExpectedPath);
                }
            }
Exemple #3
0
            public void AddRelativeFolderPath_Theory(TheoryArgs args)
            {
                AbsoluteFolderPath absoulte = args.LeftPath;
                RelativeFolderPath relative = args.RightPath;

                if (args.ExpectedPath == null)
                {
                    Trap.Exception(() => { var _ = absoulte + relative; })
                    .ShouldNotBeNull();
                }
                else
                {
                    var combined = absoulte + relative;
                    combined.ToString()
                    .ShouldEqual(args.ExpectedPath);
                }
            }