public void ApplyTest() { ParameterBinder binder = new ParameterBinder(); binder.Add(50.43); binder.Add("string"); binder.SetCustom("name", "Matthew"); binder.SetCustom("age", 25); NpgsqlCommand command = new NpgsqlCommand(); binder.Apply(command); foreach (NpgsqlParameter param in command.Parameters) { switch (param.ParameterName) { case "1": Assert.Equal(50.43, param.Value); break; case "2": Assert.Equal("string", param.Value); break; case "name": Assert.Equal("Matthew", param.Value); break; case "age": Assert.Equal(25, param.Value); break; default: Assert.True(false); break; } } }