Esempio n. 1
0
            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);
            }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
            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);
            }
Esempio n. 5
0
            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);
            }
Esempio n. 6
0
 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);
 }