public void record_failed_attemptTest_should_update_ip_record_when_ip_is_found() { Service_Manager_Accessor target = new Service_Manager_Accessor(); string ip = "make belive IP"; target.record_failed_attempt(ip); target.record_failed_attempt(ip); Assert.AreEqual(1, target._attempts.Count); Assert.AreEqual(2, target.find_attempt_by_ip(ip).Fail_Count); }
public void record_failed_attemptTest_should_create_a_new_ip_record_when_none_is_found() { Service_Manager_Accessor target = new Service_Manager_Accessor(); string ip = "make belive IP"; target.record_failed_attempt(ip); Assert.IsNotNull(target.find_attempt_by_ip(ip)); }