Пример #1
0
        public void TestToStringDomainOnly()
        {
            var config = new Configuration();

            config.CookieDomain = "www.sathai.com";
            var option = new ConfigOption(config);

            Assert.Equal("{'CookieDomain':'www.sathai.com'}",
                         option.ToString());
        }
Пример #2
0
        public void TestToStringDomainAndExpires()
        {
            var config = new Configuration();

            config.CookieDomain  = "www.sathai.com";
            config.CookieExpires = 20000;
            var option = new ConfigOption(config);

            Assert.Equal("{'CookieDomain':'www.sathai.com','CookieExpires':20000}",
                         option.ToString());
        }
Пример #3
0
        public void TestCookieToJs()
        {
            var config = new Configuration();

            config.CookieDomain  = "www.sathai.com";
            config.CookieName    = "sathai";
            config.CookieExpires = 20000;
            var option = new ConfigOption(config);
            var create = new Create(config, option);

            Assert.Equal(
                "ga('create', 'UA-XXXX-Y', 'auto', {'CookieDomain':'www.sathai.com','CookieName':'sathai','CookieExpires':20000});",
                create.ToString());
        }
Пример #4
0
 public Create(Configuration config, ConfigOption configObject)
     : this(config)
 {
     _objects = configObject;
 }