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) { //var accountSettingsService = Substitute.ForPartsOf<AccountsSettingsService>(); //accountSettingsService accountSettingsService.Invoking(x => x.GetPageLinkOrDefault(item, id, null)).ShouldThrow <ArgumentNullException>(); }
public void GetPageLinkOrDefaultShouldThrowIfDefaultIsNull(Item item, ID id, AccountsSettingsService accountSettingsService) { accountSettingsService.Invoking(x => x.GetPageLinkOrDefault(item, id, null)).ShouldThrow <ArgumentNullException>(); }