public void will_also_update_Text_if_params_are_ip_and_host() { var line = new HostsFileLine(); line.Update("127.0.0.1", "test.com"); Assert.Equal("127.0.0.1 test.com", line.Text); }
public void will_parse_text_if_param_is_text() { var line = new HostsFileLine(); line.Update("192.168.1.10 test1.com"); Assert.Equal("192.168.1.10", line.IP); Assert.Equal("test1.com", line.Host); }
public void can_support_dot_shortcut() { var line = new HostsFileLine(); line.Update(".", "test.com"); Assert.Equal("127.0.0.1 test.com", line.Text); Assert.Equal("127.0.0.1", line.IP); }