Exemple #1
0
        public void GetConnectionStringShouldReturnStringWhereNullPropertiesIgnored()
        {
            IConnectionSettings mockSettings = new MockConnectionSettings
            {
                PropertyOne   = "one",
                PropertyThree = 3
            };

            var connectionString = mockSettings.BuildConnectionString();

            Assert.Equal("PropertyOne=one;PropertyThree=3;", connectionString);
        }
Exemple #2
0
        public void GetConnectionStringShouldReturnStringWithAllPropertiesWithValue()
        {
            IConnectionSettings mockSettings = new MockConnectionSettings
            {
                PropertyOne   = "one",
                PropertyTwo   = true,
                PropertyThree = 3
            };

            var connectionString = mockSettings.BuildConnectionString();

            Assert.Equal("PropertyOne=one;PropertyTwo=True;PropertyThree=3;", connectionString);
        }