Last active
May 11, 2019 17:48
-
-
Save seangwright/1c523e21e6fe1c1d08dc97dbb60074c1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public class SettingInfoProviderFixture : AutomatedTestsWithData | |
| { | |
| /// <summary> | |
| /// Creates a fake SiteInfo | |
| /// </summary> | |
| /// <param name="siteId"></param> | |
| /// <param name="siteName"></param> | |
| public void FakeSiteInfo(int siteId, string siteName) => | |
| Fake<SiteInfo, SiteInfoProvider>().WithData( | |
| new SiteInfo | |
| { | |
| SiteID = siteId, | |
| SiteName = siteName | |
| }); | |
| /// <summary> | |
| /// Creates a fake global SettingsInfo | |
| /// </summary> | |
| /// <param name="keyName"></param> | |
| /// <param name="keyValue"></param> | |
| public void FakeSettingsInfo(string keyName, string keyValue) => | |
| Fake<SettingsKeyInfo, SettingsKeyInfoProvider>().WithData( | |
| new SettingsKeyInfo | |
| { | |
| KeyName = keyName, | |
| KeyValue = keyValue, | |
| }); | |
| /// <summary> | |
| /// Creates a fake site specific SettingsInfo | |
| /// </summary> | |
| /// <param name="keyName"></param> | |
| /// <param name="keyValue"></param> | |
| /// <param name="siteId"></param> | |
| public void FakeSettingsInfo(string keyName, string keyValue, int siteId) => | |
| Fake<SettingsKeyInfo, SettingsKeyInfoProvider>().WithData( | |
| new SettingsKeyInfo | |
| { | |
| KeyName = keyName, | |
| KeyValue = keyValue, | |
| SiteID = siteId | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment