예제 #1
0
        public void ShouldFindFirstEntryWhenMultipleMatch()
        {
            var file  = new PgPassFile(_pgpassFile);
            var entry = file.GetFirstMatchingEntry("testhost") !;

            Assert.That(entry.Password, Is.EqualTo("testpass"));
        }
예제 #2
0
        public void ShouldFindDefaultForNoMatches()
        {
            var file  = new PgPassFile(_pgpassFile);
            var entry = file.GetFirstMatchingEntry("notarealhost") !;

            Assert.That(entry.Password, Is.EqualTo("defaultpass"));
        }
예제 #3
0
        public void Should_find_first_entry_when_multiple_match()
        {
            var file  = new PgPassFile(_pgpassFile);
            var entry = file.GetFirstMatchingEntry("testhost") !;

            Assert.That(entry.Password, Is.EqualTo("testpass"));
        }