public void NullsDontBreak() { var cleaner = new ConnectionStringCleaner(); cleaner.Clean(null).ShouldBeNull(); cleaner.Clean(string.Empty).ShouldBeNull(); }
public void CleanLetStringIntact() { var cleaner = new ConnectionStringCleaner(); cleaner.Clean("Data Source=(LocalDb)\\MSSQLLocalDB;AttachDbFilename=\"C:\\Temp\\blah.mdf\";Initial Catalog=blah;Connection Timeout=60;Integrated Security=True;MultipleActiveResultSets=True") .ShouldBe("Data Source=(LocalDb)\\MSSQLLocalDB;AttachDbFilename=\"C:\\Temp\\blah.mdf\";Initial Catalog=blah;Connection Timeout=60;Integrated Security=True;MultipleActiveResultSets=True"); }