Exemple #1
0
        public void ToSitecoreSiteInfoProperties_ReturnsInnerCollectionByDefault()
        {
            string siteName    = Guid.NewGuid().ToString();
            string newSiteName = Guid.NewGuid().ToString();
            var    builder     = new SiteInfoPropertiesBuilder(siteName);
            var    properties  = builder.ToSitecoreSiteInfoProperties();

            builder.WithSiteName(newSiteName);

            properties[NSubstituteUtils.Constants.SiteProperties.SiteName].Should().Be(newSiteName);
        }
Exemple #2
0
        public void ToSitecoreSiteInfoProperties_ReturnsCopyWhenAsked()
        {
            string siteName      = Guid.NewGuid().ToString();
            string newSiteName   = Guid.NewGuid().ToString();
            var    builder       = new SiteInfoPropertiesBuilder(siteName);
            var    properties    = builder.ToSitecoreSiteInfoProperties(true);
            var    newProperties = builder.WithSiteName(newSiteName).ToSitecoreSiteInfoProperties();

            properties[NSubstituteUtils.Constants.SiteProperties.SiteName].Should().Be(siteName);
            newProperties[NSubstituteUtils.Constants.SiteProperties.SiteName].Should().Be(newSiteName);
        }