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 ShouldBuildWithOutParam() { // Arrange IStoreProcParamsBuilder builder = new StoreProcParamsBuilder(); // Act builder.WithOutParam<bool>("name", 100); // Assert StoredProcParam param = builder.Build().First(); param.Name.ShouldBe("name"); param.Type.ShouldBe("boolean"); param.ParamType.ShouldBe("OUT"); param.Value.ShouldBe(null); param.Length.ShouldBe(100); }
public void ShouldBuildWithOutParam() { // Arrange IStoreProcParamsBuilder builder = new StoreProcParamsBuilder(); // Act builder.WithOutParam <bool>("name", 100); // Assert StoredProcParam param = builder.Build().First(); param.name.ShouldBe("name"); param.type.ShouldBe("boolean"); param.param_type.ShouldBe("OUT"); param.value.ShouldBe(null); param.length.ShouldBe(100); }