public void Configuration_GetHostNameHash_Returns_Correct_Hash_When_CalculateHostNameHash_Is_True() { var attackPatternConfiguration = new Configuration("UA-1234-5", "attackpattern.com") { CalculateHostNameHash = true }; var stickerTalesConfiguration = new Configuration("UA-1234-6", "stickertales.com") { CalculateHostNameHash = true }; var damiengConfiguration = new Configuration("UA-2345-6", "damieng.com") { CalculateHostNameHash = true }; Assert.AreEqual(162214764, attackPatternConfiguration.GetHostNameHash()); Assert.AreEqual(59641711, stickerTalesConfiguration.GetHostNameHash()); Assert.AreEqual(247163921, damiengConfiguration.GetHostNameHash()); }
public void Configuration_GetHostNameHash_Returns_One_When_CalculateHostNameHash_Is_False() { var attackPatternConfiguration = new Configuration("UA-1234-5", "attackpattern.com") { CalculateHostNameHash = false }; Assert.AreEqual(1, attackPatternConfiguration.GetHostNameHash()); }