コード例 #1
0
        public void GetUserDefaultProfileShoulReturnListOfInterests(Db db, ID profileId, ID interestFolderId, ProfileSettingsService profileSettingsService, IEnumerable<string> interests)
        {
            var coreDb = new Db("core");
              var siteContext = this.BuildSiteContext(db, coreDb, profileId, interestFolderId, interests);

              using (new SiteContextSwitcher(siteContext))
              using (db)
              using (coreDb)
              {
            var interestsResult = profileSettingsService.GetInterests();
            interestsResult.Should().BeEquivalentTo(interests);
              }
        }
コード例 #2
0
        public void GetUserDefaultProfileShoulReturnProfileItem(Db db, ID profileId, ID interestFolderId, ProfileSettingsService profileSettingsService, IEnumerable<string> interests)
        {
            var coreDb = new Db("core");
              var siteContext = this.BuildSiteContext(db, coreDb, profileId, interestFolderId, interests);

              using (new SiteContextSwitcher(siteContext))
              using (db)
              using (coreDb)
              {
            var item = profileSettingsService.GetUserDefaultProfile();
            item.Should().NotBeNull();
            item.ID.Should().Be(profileId);
              }
        }