public void GetRegisterOutcome_NullSettingsItem_ShouldthrowException(Db db, AccountsSettingsService accountsSettingsService) { //Arrange var fakeSite = BuildUpSiteContext(db, null); db.GetItem("/sitecore/content").DeleteChildren(); using (new SiteContextSwitcher(fakeSite)) { //Act //Assert accountsSettingsService.Invoking(x=>x.GetRegistrationOutcome(null)).ShouldThrow<ItemNotFoundException>(); } }
public void GetPageLinkOrDefaultShouldThrowIfDefaultIsNull(Item item, ID id, AccountsSettingsService accountSettingsService) { accountSettingsService.Invoking(x => x.GetPageLinkOrDefault(item, id, null)).ShouldThrow<ArgumentNullException>(); }