public void CanJoinColumnsAndValues() { GenericTransformationProvider provider = new GenericTransformationProvider(); string result = provider.JoinColumnsAndValues(new[] { "foo", "bar" }, new[] { "123", "456" }); Assert.AreEqual("foo='123' , bar='456'", result); }
public void InstanceForProvider() { ITransformationProvider provider = new GenericTransformationProvider(); ITransformationProvider localProv = provider.For<GenericDialect>(); Assert.That(localProv is GenericTransformationProvider); ITransformationProvider localProv2 = provider.For<SqlServerDialect>(); Assert.That(localProv2 is NoOpTransformationProvider); }
public void ExecuteActionsForProvider() { int i = 0; ITransformationProvider provider = new GenericTransformationProvider(); provider.For<GenericDialect>(database => i = 5); Assert.AreEqual(5, i); provider.For<SqlServerDialect>(database => i = 15); Assert.AreNotEqual(15, i); }