示例#1
0
 public void ReturnsReaderResults(
     FilePath existing,
     MutagenPatchersListing listing,
     CancellationToken cancel,
     RegistryListingsProvider sut)
 {
     sut.FilePathProvider.Path.Returns(existing);
     sut.ListingReader.Read(default).ReturnsForAnyArgs(listing);
示例#2
0
 public void MissingListingPathReturnsFailure(
     FilePath missing,
     CancellationToken cancel,
     RegistryListingsProvider sut)
 {
     sut.FilePathProvider.Path.Returns(missing);
     sut.Get(cancel)
     .Succeeded.Should().BeFalse();
 }
示例#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);
 }
示例#4
0
 public void FailedPrepReturnsFail(
     ErrorResponse fail,
     CancellationToken cancel,
     RegistryListingsProvider sut)
 {
     sut.PrepRegistryRepository.Prep(cancel)
     .Returns(fail);
     sut.Get(cancel)
     .Succeeded.Should().BeFalse();
 }