コード例 #1
0
        public void Constructor_InitialisesCorrectly()
        {
            var sut = new HostsFile();

            Assert.Empty(sut.AllComments());
            Assert.Empty(sut.AllHostEntries());
        }
コード例 #2
0
        public void AddComment_AddsCommentToHostFile()
        {
            var sut = new HostsFile();

            sut.AddComment("Test comment");
            Assert.Equal(1, sut.AllComments().Count());
        }
コード例 #3
0
        public void Constructor_InitialisesCorrectly()
        {
            var sut = new HostsFile();

            Assert.Empty(sut.AllComments());
            Assert.Empty(sut.AllHostEntries());
        }
コード例 #4
0
        public void RemoveComment_RemovesCommentFromHostFile()
        {
            var sut = new HostsFile();
            sut.AddComment("Test comment");

            sut.RemoveComment("Test comment");

            Assert.Empty(sut.AllComments());
        }
コード例 #5
0
        public void RemoveComment_RemovesCommentFromHostFile()
        {
            var sut = new HostsFile();

            sut.AddComment("Test comment");

            sut.RemoveComment("Test comment");

            Assert.Empty(sut.AllComments());
        }
コード例 #6
0
 public void AddComment_AddsCommentToHostFile()
 {
     var sut = new HostsFile();
     sut.AddComment("Test comment");
     Assert.Equal(1, sut.AllComments().Count());
 }