public void AppendValueShouldOnlyByHyphenForNegativeOneSignOnly() { var builder = new StringBuilder(); BaseWrapper.AppendValueWrapper(builder, -1, true); Assert.Equal("-", builder.ToString()); }
public void AppendValueShouldDoNothingForZero() { var builder = new StringBuilder(); BaseWrapper.AppendValueWrapper(builder, 0, false); Assert.Equal(0, builder.Length); }
public void AppendValueShouldDoNothingForOneSignOnly() { var builder = new StringBuilder(); BaseWrapper.AppendValueWrapper(builder, 1, true); Assert.Equal(0, builder.Length); }
public void AppendValueShouldHaveAdditionForPositive() { var value = ((long)this.random.Next()) + 1; var builder = new StringBuilder(); BaseWrapper.AppendValueWrapper(builder, value, false); Assert.Equal(" + " + value, builder.ToString()); }
public void AppendValueShouldErrorWhenExpressionBuilderIsNull() { Assert.Throws <ArgumentNullException>(() => BaseWrapper.AppendValueWrapper(null, 1, false)); }