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=***;")); }
public override string ToString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(PropertyMapper <DbSettingsContainer> .PropertyName(t => t.ApplicationConnectionString)); stringBuilder.Append(" = " + ConnectionStringEncoder.Encode(ApplicationConnectionString)); return(stringBuilder.ToString()); }