Created
September 18, 2021 16:45
-
-
Save davidwesst/c6d8b292d71fe3cdc2919e218b9dcc84 to your computer and use it in GitHub Desktop.
Which spacing on a chained method call looks better?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// one line | |
serviceClientMock.Setup(scm => scm.CreateBlobContainer(It.IsAny<string>(), PublicAccessType.Blob, Mock.Of<IDictionary<string, string>>(), CancellationToken.None)).Returns((string s) => Azure.Response.FromValue<BlobContainerClient>(GenerateBlobContainerClient(s).Object, Mock.Of<Azure.Response>())); | |
// one line per method | |
serviceClientMock | |
.Setup(scm => scm.CreateBlobContainer(It.IsAny<string>(), PublicAccessType.Blob, Mock.Of<IDictionary<string, string>>(), CancellationToken.None)) | |
.Returns((string s) => Azure.Response.FromValue<BlobContainerClient>(GenerateBlobContainerClient(s).Object, Mock.Of<Azure.Response>())); | |
// one line per parameter | |
serviceClientMock.Setup(scm => scm.CreateBlobContainer( | |
It.IsAny<string>() | |
, PublicAccessType.Blob, Mock.Of<IDictionary<string, string>>() | |
, CancellationToken.None)) | |
.Returns((string s) => Azure.Response.FromValue<BlobContainerClient>( | |
GenerateBlobContainerClient(s).Object, | |
Mock.Of<Azure.Response>())); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment