예제 #1
0
        public void Encode()
        {
            const string CONNECTION_STRING = "Data Source=OnlineStoreDbSrv;Initial Catalog=OnlineStore;Persist Security Info=True;User ID=sa;Password=sa;";

            string actual = ConnectionStringEncoder.Encode(CONNECTION_STRING);

            Assert.That(actual, Is.EqualTo("Data Source=OnlineStoreDbSrv;Initial Catalog=OnlineStore;Persist Security Info=True;User ID=***;Password=***;"));
        }
예제 #2
0
            public override string ToString()
            {
                StringBuilder stringBuilder = new StringBuilder();

                stringBuilder.Append(PropertyMapper <DbSettingsContainer> .PropertyName(t => t.ApplicationConnectionString));
                stringBuilder.Append(" = " + ConnectionStringEncoder.Encode(ApplicationConnectionString));

                return(stringBuilder.ToString());
            }