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