public void Should_Succeed_On_Connection_String_Found() { var resolver = new ConnectionStringResolver { ConnectionStrings = new ConnectionStringSettingsCollection { new ConnectionStringSettings("correct_name", "Some text"), new ConnectionStringSettings("wrong_name", "Wrong text") } }; resolver.ResolveConnectionString("correct_name").Should().Be("Some text"); }
public void Should_Fail_On_Empty_Connection_String() { var resolver = new ConnectionStringResolver { ConnectionStrings = new ConnectionStringSettingsCollection { new ConnectionStringSettings("correct_name", "") } }; Assert.Throws <TransportException>(() => resolver.ResolveConnectionString("correct_name")); }