public void upsert_new() { var accountsSettings = new AccountsSettings(); accountsSettings.Accounts.Count.Should().Be(0); accountsSettings.Upsert("cng", "us"); accountsSettings.Accounts.Count.Should().Be(1); accountsSettings.GetAccount("cng", "us").AccountId.Should().Be("cng"); }
public void get_where() { var idUs = new Identity(usLocale); var acct1 = new Account("cng") { IdentityTokens = idUs, AccountName = "foo" }; var idUk = new Identity(ukLocale); var acct2 = new Account("cng") { IdentityTokens = idUk, AccountName = "bar" }; var accountsSettings = new AccountsSettings(); accountsSettings.Add(acct1); accountsSettings.Add(acct2); accountsSettings.GetAccount("cng", "uk").AccountName.Should().Be("bar"); }