public void WhenCalling_GetImageAsync_WithNullParameter_Should_ThrowArgumentNullException() { var sut = new ImagesCache(A.Dummy <IDistributedCache>()); sut.Awaiting(ic => ic.GetImageAsync(null)) .Should().ThrowExactly <ArgumentNullException>(); }
public void WhenCalling_CacheImageAsync_WithNullImageParameter_Should_ThrowArgumentNullException() { var distributedCache = A.Dummy <IDistributedCache>(); var sut = new ImagesCache(distributedCache); sut.Awaiting(ic => ic.CacheImageAsync(new ImageCacheKey("01_04_2019_001103"), null)) .Should().ThrowExactly <ArgumentNullException>(); }
public void WhenCalling_CacheImageAsync_WithNullKeyParameter_Should_ThrowArgumentNullException() { var distributedCache = A.Dummy <IDistributedCache>(); var sut = new ImagesCache(distributedCache); sut.Awaiting(ic => ic.CacheImageAsync(null, new Image())) .Should().ThrowExactly <ArgumentNullException>(); }