public void UnmodifiedFilesAreAdded()
            {
                // Arrange

                const string file1     = "File1";
                const string file1Hash = "File1Hash";

                var delta = new DiffResult();

                var target = new List <FileMetadata>
                {
                    new FileMetadata
                    {
                        Hash = file1Hash,
                        Name = file1
                    }
                };

                var diff = new FileListDiffService(
                    Mock.Of <IFileHashService>(),
                    Mock.Of <ITimeProvider>());

                // Act

                var result = diff.Apply(delta, target);

                // Assert

                Assert.AreEqual(1, result.Files.Count);

                Assert.AreEqual(file1, result.Files[0].Name);
                Assert.AreEqual(file1Hash, result.Files[0].Hash);
            }
            public void TimestampIsSet()
            {
                // Arrange

                var now    = new DateTime(2019, 3, 13, 11, 30, 0);
                var delta  = new DiffResult();
                var target = new List <FileMetadata>();

                var timeProvider = Mock.Of <ITimeProvider>(t =>
                                                           t.UtcNow == now);

                var diff = new FileListDiffService(
                    Mock.Of <IFileHashService>(),
                    timeProvider);

                // Act

                var result = diff.Apply(delta, target);

                // Assert

                Assert.AreEqual(now, result.LastUpdated);
            }