public void SourceLocationsValidateCallsValidateOnSourcesInsideCollection()
        {
            var loc1 = new LocalSourceLocation();

            loc1.Path            = Environment.CurrentDirectory;
            loc1.RevisionCount   = 1;
            loc1.ID              = 1;
            loc1.FileMatchFilter = "*";

            var loc2 = new LocalSourceLocation();

            loc2.Path            = Environment.CurrentDirectory;
            loc2.RevisionCount   = 1;
            loc2.ID              = 2;
            loc2.FileMatchFilter = "*";

            var loc3 = new LocalSourceLocation();

            loc3.Path            = Environment.CurrentDirectory;
            loc3.RevisionCount   = 0; // this should cause a validation error
            loc3.ID              = 3;
            loc3.FileMatchFilter = "*";

            var locations = new ArchivialLibrary.Folders.SourceLocations();

            locations.Add(loc1);
            locations.Add(loc2);
            locations.Add(loc3);

            // should throw
            locations.Validate();
        }
        public void SourceLocationsValidateDoesNotThrowOnAllValidSources()
        {
            var loc1 = new LocalSourceLocation();

            loc1.Path            = Environment.CurrentDirectory;
            loc1.RevisionCount   = 1;
            loc1.ID              = 1;
            loc1.FileMatchFilter = "*";

            var loc2 = new LocalSourceLocation();

            loc2.Path            = Environment.CurrentDirectory;
            loc2.RevisionCount   = 1;
            loc2.ID              = 2;
            loc2.FileMatchFilter = "*";

            var loc3 = new LocalSourceLocation();

            loc3.Path            = Environment.CurrentDirectory;
            loc3.RevisionCount   = 1;
            loc3.ID              = 3;
            loc3.FileMatchFilter = "*";

            var locations = new ArchivialLibrary.Folders.SourceLocations();

            locations.Add(loc1);
            locations.Add(loc2);
            locations.Add(loc3);

            // should throw
            locations.Validate();

            Assert.IsTrue(true);
        }
        public void SourceLocationsValidateThrowsExceptionOnDuplicateIDs()
        {
            var loc1 = new LocalSourceLocation();

            loc1.Path            = Environment.CurrentDirectory;
            loc1.RevisionCount   = 1;
            loc1.ID              = 1;
            loc1.FileMatchFilter = "*";

            var loc2 = new LocalSourceLocation();

            loc2.Path            = Environment.CurrentDirectory;
            loc2.RevisionCount   = 1;
            loc2.ID              = 2;
            loc2.FileMatchFilter = "*";

            var loc3 = new LocalSourceLocation();

            loc3.Path            = Environment.CurrentDirectory;
            loc3.RevisionCount   = 1;
            loc3.ID              = 2;
            loc3.FileMatchFilter = "*";

            var locations = new ArchivialLibrary.Folders.SourceLocations();

            locations.Add(loc1);
            locations.Add(loc2);
            locations.Add(loc3);

            // should throw
            locations.Validate();
        }