Exemplo n.º 1
0
 public void ReturnsReaderResults(
     FilePath existing,
     MutagenPatchersListing listing,
     CancellationToken cancel,
     RegistryListingsProvider sut)
 {
     sut.FilePathProvider.Path.Returns(existing);
     sut.ListingReader.Read(default).ReturnsForAnyArgs(listing);
Exemplo n.º 2
0
 public void MissingListingPathReturnsFailure(
     FilePath missing,
     CancellationToken cancel,
     RegistryListingsProvider sut)
 {
     sut.FilePathProvider.Path.Returns(missing);
     sut.Get(cancel)
     .Succeeded.Should().BeFalse();
 }
Exemplo n.º 3
0
 public void PassesListingPathToReader(
     FilePath existing,
     CancellationToken cancel,
     RegistryListingsProvider sut)
 {
     sut.FilePathProvider.Path.Returns(existing);
     sut.Get(cancel);
     sut.ListingReader.Received(1).Read(existing);
 }
Exemplo n.º 4
0
 public void FailedPrepReturnsFail(
     ErrorResponse fail,
     CancellationToken cancel,
     RegistryListingsProvider sut)
 {
     sut.PrepRegistryRepository.Prep(cancel)
     .Returns(fail);
     sut.Get(cancel)
     .Succeeded.Should().BeFalse();
 }