public void ShouldThrowIfNameIsNull() { // Arrange IStoreProcParamsBuilder builder = new StoreProcParamsBuilder(); // Act & Assert Should.Throw<ArgumentNullException>(() => builder.WithOutParam<bool>(null, 100)); Should.Throw<ArgumentNullException>(() => builder.WithInParam<bool>(null, true)); Should.Throw<ArgumentNullException>(() => builder.WithInOutParam<bool>(null, true, 100)); }
public void ShouldThrowIfNameIsNull() { // Arrange IStoreProcParamsBuilder builder = new StoreProcParamsBuilder(); // Act & Assert Should.Throw <ArgumentNullException>(() => builder.WithOutParam <bool>(null, 100)); Should.Throw <ArgumentNullException>(() => builder.WithInParam <bool>(null, true)); Should.Throw <ArgumentNullException>(() => builder.WithInOutParam <bool>(null, true, 100)); }
public void ShouldBuildWithInParam() { // Arrange IStoreProcParamsBuilder builder = new StoreProcParamsBuilder(); // Act builder.WithInParam("name", 123); // Assert StoredProcParam param = builder.Build().First(); param.Name.ShouldBe("name"); param.Type.ShouldBe("integer"); param.ParamType.ShouldBe("IN"); param.Value.ShouldBe("123"); }
public void ShouldBuildWithInParam() { // Arrange IStoreProcParamsBuilder builder = new StoreProcParamsBuilder(); // Act builder.WithInParam("name", 123); // Assert StoredProcParam param = builder.Build().First(); param.name.ShouldBe("name"); param.type.ShouldBe("integer"); param.param_type.ShouldBe("IN"); param.value.ShouldBe("123"); }