public void CannotUseInJSEnginee() { string jsFormat = "var f = function() {var i = 30; #replace# var j = 10; return i + j;}; f();"; var engine = new ScriptEngine(); IBrowserAPI api = new GeolocationAPI(); var result = engine.Evaluate <int>(jsFormat.Replace("#replace#", api.GetAPIJSCode())); Assert.AreNotEqual(result, 40); }
public void BrowserEnable() { IBrowserAPI api = new GeolocationAPI(); Assert.IsFalse(api.IsThisBrowserEnableThisBrowserAPI(new IE6())); Assert.IsFalse(api.IsThisBrowserEnableThisBrowserAPI(new IE7())); Assert.IsFalse(api.IsThisBrowserEnableThisBrowserAPI(new IE8())); Assert.IsTrue(api.IsThisBrowserEnableThisBrowserAPI(new IE9())); Assert.IsTrue(api.IsThisBrowserEnableThisBrowserAPI(new IE10())); Assert.IsTrue(api.IsThisBrowserEnableThisBrowserAPI(new IE11())); Assert.IsTrue(api.IsThisBrowserEnableThisBrowserAPI(new Chrome())); Assert.IsTrue(api.IsThisBrowserEnableThisBrowserAPI(new Firefox())); Assert.IsTrue(api.IsThisBrowserEnableThisBrowserAPI(new Opera())); Assert.IsTrue(api.IsThisBrowserEnableThisBrowserAPI(new Safari())); }
public UserAccountService() : base() { _hasher = new PasswordHasher(); _userRepository = new UserAccountRepository(); _geoLocation = new GeolocationAPI(); }
public ShopResultsService() : base() { _geoLocation = new GeolocationAPI(); _userRepository = new UserAccountRepository(); }