Skip to content

Instantly share code, notes, and snippets.

@tonidy
Forked from umair-me/mock.cs
Created January 21, 2022 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonidy/599d0b283c8b2bc1e5e4963d1fe2e371 to your computer and use it in GitHub Desktop.
Save tonidy/599d0b283c8b2bc1e5e4963d1fe2e371 to your computer and use it in GitHub Desktop.
Mock Configuration.GetSection
Mock<IConfiguration> configuration = new Mock<IConfiguration>();
configuration.Setup(c => c.GetSection(It.IsAny<String>())).Returns(new Mock<IConfigurationSection>().Object);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment