public void WithShouldCorrectlyOverridePropertiesWithProvidedValues() { var snapshot = new RepositorySnapshot(string.Empty, string.Empty, new List <IFile>(), string.Empty, string.Empty, string.Empty, default(DateTime), 0, 0); var newSnapshot = snapshot.With(MockRepo.CreateFiles(3), "hash", "path", DateTime.Today, "newName"); newSnapshot.AtHash .Match(x => x, () => string.Empty) .Should() .Be("hash"); newSnapshot.PathToCoverageResultFile .Match(x => x, () => string.Empty) .Should() .Be("path"); newSnapshot.CommitCreationDate .Match(x => x, () => default) .Should() .NotBe(default);