コード例 #1
0
        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>();
            }
        }
コード例 #2
0
 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>();
 }
コード例 #3
0
 public void GetPageLinkOrDefaultShouldThrowIfDefaultIsNull(Item item, ID id, AccountsSettingsService accountSettingsService)
 {
     accountSettingsService.Invoking(x => x.GetPageLinkOrDefault(item, id, null)).ShouldThrow <ArgumentNullException>();
 }