Exemplo n.º 1
0
 public void GetSubdomainRules()
 {
     var utmRule = Factory.CreateDao<UtmSubdomainRule>();
     var rules = new UserProvider().GetSubdomainRules();
     Assert.AreEqual(1, rules.Length);
     Assert.AreEqual(utmRule.ID, rules[0].ID);
     Assert.AreEqual(utmRule.Subdomainname, rules[0].SubdomainName);
     Assert.AreEqual(utmRule.Targetdomain, rules[0].TargetDomain);
 }
Exemplo n.º 2
0
 public void CreateNewGuestTest(string userAgent, bool isBot)
 {
     string ip = "1.1.1.1";
     var guestID = new UserProvider()
         .CreateNewGuest(ip, userAgent);
     if (isBot) {
         Assert.AreEqual(0, Guest.DataSource.Count());
     }
     else {
         Assert.AreEqual(1, Guest.DataSource.Count());
         var guestEntity = Guest.DataSource.First();
         Assert.AreEqual(guestID, guestEntity.ID);
         Assert.AreEqual(ip, guestEntity.Ip);
     }
 }