public void create_connectionString_with_DummyProperty_without_value() { DummyConnectionString connectionString = new DummyConnectionString(); connectionString.ChangePropertyText(c => c.DummyProperty, "Dummy"); string connection = connectionString.GetConnectionString(); Assert.AreEqual("Dummy=;", connection); }
public void change_property_name() { DummyConnectionString connectionString = new DummyConnectionString(); connectionString.ChangePropertyText(c => c.DummyProperty, "NewDummy"); string connection = connectionString.GetConnectionString(); Assert.IsTrue(connection.Contains("NewDummy")); }
public void add_new_static_value_to_connectionString() { DummyConnectionString connectionString = new DummyConnectionString(); connectionString.AddStaticValues("Servidor", "1985:20"); string connection = connectionString.GetConnectionString(); Assert.AreEqual("Servidor=1985:20;", connection); }
public void create_connectionString_with_DummyBoolProperty() { DummyConnectionString connectionString = new DummyConnectionString(); connectionString.ChangePropertyText(c => c.DummyBoolProperty, "Dummy bool"); connectionString.DummyBoolProperty = true; string connection = connectionString.GetConnectionString(); Assert.AreEqual("Dummy bool=True;", connection); }
public void create_connectionString_with_DummyProperty_with_value_but_is_ignored() { DummyConnectionString connectionString = new DummyConnectionString(); connectionString.ChangePropertyText(c => c.DummyProperty, "Dummy", "Dummy value"); connectionString.DummyProperty = "Dummy value"; string connection = connectionString.GetConnectionString(); Assert.AreEqual(string.Empty, connection); }
public void create_connectionString_with_DummyProperty_with_value_and_static_value() { DummyConnectionString connectionString = new DummyConnectionString(); connectionString.ChangePropertyText(c => c.DummyProperty, "Dummy"); connectionString.DummyProperty = "Dummy value"; connectionString.AddStaticValues("Servidor", "1985:20"); string connection = connectionString.GetConnectionString(); Assert.AreEqual("Dummy=Dummy value;Servidor=1985:20;", connection); }
public void create_connectionString_with_mapped_DummyBoolProperty_but_not_use_mapped_value() { DummyConnectionString connectionString = new DummyConnectionString(); connectionString.ChangePropertyText(c => c.DummyBoolProperty, "Dummy bool"); connectionString.DummyBoolProperty = false; connectionString.MapValue(c => c.DummyBoolProperty).Map(true, "Verdadero"); string connection = connectionString.GetConnectionString(); Assert.AreEqual("Dummy bool=False;", connection); }
public void create_connectionString_with_DummyProperty_and_Server() { DummyConnectionString connectionString = new DummyConnectionString(); connectionString.ChangePropertyText(c => c.Server, "Server"); connectionString.ChangePropertyText(c => c.DummyProperty, "Dummy"); connectionString.DummyProperty = "Dummy value"; connectionString.Server = "Server value"; string connection = connectionString.GetConnectionString(); Assert.AreEqual("Server=Server value;Dummy=Dummy value;", connection); }
public void change_property_name_with_ignore_values() { DummyConnectionString connectionString = new DummyConnectionString() { DummyProperty = "ignored string" }; connectionString.ChangePropertyText(c => c.DummyProperty, "Dummy", "ignored string"); string connection = connectionString.GetConnectionString(); Assert.IsFalse(connection.Contains("Dummy")); }