コード例 #1
0
    public void ShouldReturnNullIfNoBlobStreamExistsInDataStorage(GetBlobStreamCommand sut, Guid blobId)
    {
      // arrange
      sut.Initialize(blobId);

      // act & assert
      ReflectionUtil.CallMethod(sut, "DoExecute").Should().BeNull();
    }
コード例 #2
0
    public void ShouldGetBlobStreamFromDataStorage(GetBlobStreamCommand sut, Guid blobId, [Modest]MemoryStream stream)
    {
      // arrange
      sut.DataStorage.GetBlobStream(blobId).Returns(stream);
      sut.Initialize(blobId);

      // act & assert
      ReflectionUtil.CallMethod(sut, "DoExecute").Should().BeSameAs(stream);
    }