예제 #1
0
        public void TransformCellAddressToNumber_EmptyInput_EmptyString()
        {
            var         calculating = new Calculating();
            var         input       = "";
            List <Data> table       = new List <Data>();

            var result = calculating.TransformCellAddressToNumber(input, table);

            Assert.AreEqual("", result);
        }
예제 #2
0
        public void TransformCellAddressToNumber_ValidData_ValidResult()
        {
            var         calculating = new Calculating();
            var         input       = "A1 + B121 + 3";
            List <Data> table       = new List <Data>
            {
                new Data
                {
                    Address = "A1",
                    Value   = 1
                },
                new Data
                {
                    Address = "B121",
                    Value   = 2
                }
            };

            var result = calculating.TransformCellAddressToNumber(input, table);

            Assert.AreEqual("1 + 2 + 3", result);
        }