Exemplo n.º 1
0
        public void TestBuildMultipleDigits()
        {
            ValueBuilder builder = new ValueBuilder();

            builder.PushDigit(1);
            builder.PushDigit(3);
            Assert.AreEqual(13, builder.GetValue());
        }
Exemplo n.º 2
0
        public void TestTrailingSeparator()
        {
            ValueBuilder builder = new ValueBuilder();

            builder.PushDigit(1);
            builder.PushDigit(2);
            builder.PushSeparator();
            Assert.AreEqual(12, builder.GetValue());
        }
Exemplo n.º 3
0
        public void TestLeadingSeparator()
        {
            ValueBuilder builder = new ValueBuilder();

            builder.PushSeparator();
            builder.PushDigit(1);
            builder.PushDigit(4);
            Assert.AreEqual(0.14M, builder.GetValue());
        }
Exemplo n.º 4
0
        public void TestSingleDigitDecimal()
        {
            ValueBuilder builder = new ValueBuilder();

            builder.PushDigit(1);
            builder.PushSeparator();
            builder.PushDigit(2);
            Assert.AreEqual(1.2M, builder.GetValue());
        }
Exemplo n.º 5
0
        public void TestMultiDigitDecimal()
        {
            ValueBuilder builder = new ValueBuilder();

            builder.PushDigit(1);
            builder.PushDigit(2);
            builder.PushSeparator();
            builder.PushDigit(3);
            builder.PushDigit(4);
            Assert.AreEqual(12.34M, builder.GetValue());
        }
Exemplo n.º 6
0
        public void TestAfterClear()
        {
            ValueBuilder builder = new ValueBuilder();

            builder.PushDigit(1);

            builder.Clear();

            builder.PushDigit(2);
            Assert.AreEqual(2, builder.GetValue());
        }
Exemplo n.º 7
0
        public void TestSingleDigit()
        {
            ValueBuilder builder = new ValueBuilder();

            builder.PushDigit(1);
            Assert.AreEqual(1, builder.GetValue());
        }
Exemplo n.º 8
0
        public void TestDoubleSeparator()
        {
            ValueBuilder builder = new ValueBuilder();

            builder.PushSeparator();
            builder.PushDigit(5);
            builder.PushSeparator();
        }