Exemple #1
0
        public void FindColumnNamesInCalculatedFieldWithAggregationMethod_(
            string fieldName,
            string expected)
        {
            var result = new TestCalculatedColumnHelper().FindColumnNamesInCalculatedFieldWithAggregationMethod(fieldName);

            var str = string.Join(",", result.Select(x => x.Item1 + "|" + x.Item2));

            Assert.AreEqual(expected, str);
        }
Exemple #2
0
        public void FindColumnNamesInCalculatedField_WithTestCase_ReturnsExpected(
            string input,
            string expectedCsv)
        {
            var expected = expectedCsv.Split(',');

            var result = new TestCalculatedColumnHelper().FindColumnNamesInCalculatedField(input);

            Assert.AreEqual(expected.Count(), result.Count);
            foreach (var exp in expected)
            {
                Assert.IsTrue(result.Contains(exp));
            }
        }
Exemple #3
0
        public void ReplaceFieldName_WithTestCase_ReturnsExpected(string input, string oldName, string newName, string expected)
        {
            var result = new TestCalculatedColumnHelper().ReplaceFieldName(new Stack <string>(), input, oldName, newName);

            Assert.AreEqual(expected, result);
        }