コード例 #1
0
        public void AppendValueShouldOnlyByHyphenForNegativeOneSignOnly()
        {
            var builder = new StringBuilder();

            BaseWrapper.AppendValueWrapper(builder, -1, true);

            Assert.Equal("-", builder.ToString());
        }
コード例 #2
0
        public void AppendValueShouldDoNothingForZero()
        {
            var builder = new StringBuilder();

            BaseWrapper.AppendValueWrapper(builder, 0, false);

            Assert.Equal(0, builder.Length);
        }
コード例 #3
0
        public void AppendValueShouldDoNothingForOneSignOnly()
        {
            var builder = new StringBuilder();

            BaseWrapper.AppendValueWrapper(builder, 1, true);

            Assert.Equal(0, builder.Length);
        }
コード例 #4
0
        public void AppendValueShouldHaveAdditionForPositive()
        {
            var value   = ((long)this.random.Next()) + 1;
            var builder = new StringBuilder();

            BaseWrapper.AppendValueWrapper(builder, value, false);

            Assert.Equal(" + " + value, builder.ToString());
        }
コード例 #5
0
 public void AppendValueShouldErrorWhenExpressionBuilderIsNull()
 {
     Assert.Throws <ArgumentNullException>(() => BaseWrapper.AppendValueWrapper(null, 1, false));
 }