Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save seangwright/398f867459a1690cc2f12c52eabe6469 to your computer and use it in GitHub Desktop.
Save seangwright/398f867459a1690cc2f12c52eabe6469 to your computer and use it in GitHub Desktop.
[Test, AutoDomainData]
public void GetString_Will_Return_Site_Setting_Value(
SettingInfoProviderFixture fixture,
ISiteContext siteContext)
{
// Explicitly defined values
string keyName = "key1";
string keyValue = "value1";
string siteName = "testSite";
int siteId = 3;
fixture.FakeSiteInfo(siteId, siteName);
fixture.FakeSettingsInfo(keyName, keyValue, siteId);
siteContext.SiteName.Returns(siteName);
var sut = new KenticoSettingConfigProvider(siteContext);
string setting = sut.GetString(keyName);
setting.Should().Be(keyValue);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment