Example #1
0
 public void MissingListingPathReturnsFailure(
     FilePath missing,
     CancellationToken cancel,
     RegistryListingsProvider sut)
 {
     sut.FilePathProvider.Path.Returns(missing);
     sut.Get(cancel)
     .Succeeded.Should().BeFalse();
 }
Example #2
0
 public void PassesListingPathToReader(
     FilePath existing,
     CancellationToken cancel,
     RegistryListingsProvider sut)
 {
     sut.FilePathProvider.Path.Returns(existing);
     sut.Get(cancel);
     sut.ListingReader.Received(1).Read(existing);
 }
Example #3
0
 public void FailedPrepReturnsFail(
     ErrorResponse fail,
     CancellationToken cancel,
     RegistryListingsProvider sut)
 {
     sut.PrepRegistryRepository.Prep(cancel)
     .Returns(fail);
     sut.Get(cancel)
     .Succeeded.Should().BeFalse();
 }