Exemple #1
0
        public void QueryFieldTypeTest()
        {
            DataTable table = CreateLookupWithFieldType();
            Dictionary <string, SearchFieldType> types = QueryLookupHelper.GetFieldTypes(table);

            Assert.AreEqual(table.Rows.Count, types.Count);
            Assert.AreEqual(SearchFieldType.Bit, types["fBit"]);
            Assert.AreEqual(SearchFieldType.Date, types["fDate"]);
            Assert.AreEqual(SearchFieldType.Float, types["fFloat"]);
            Assert.AreEqual(SearchFieldType.ID, types["fID"]);
            Assert.AreEqual(SearchFieldType.Integer, types["fInteger"]);
            Assert.AreEqual(SearchFieldType.String, types["fString"]);
        }
Exemple #2
0
        public void QueryParamTypeTest()
        {
            DataTable table = CreateLookupWithFF();

            Dictionary <string, SearchFieldType> types = QueryLookupHelper.GetFieldTypes(table);

            Assert.AreEqual(SearchFieldType.Integer, types["fNumeric"]);
            Assert.AreEqual(SearchFieldType.Bit, types["fBoolean"]);
            Assert.AreEqual(SearchFieldType.String, types["fCaption"]);
            Assert.AreEqual(SearchFieldType.Date, types["fDate"]);
            Assert.AreEqual(SearchFieldType.Date, types["fDateTime"]);
            Assert.AreEqual(SearchFieldType.Integer, types["fMonths"]);
            Assert.AreEqual(SearchFieldType.String, types["fString"]);
            Assert.AreEqual(SearchFieldType.Integer, types["fNumericNatural"]);
            Assert.AreEqual(SearchFieldType.Integer, types["fNumericPositive"]);
            Assert.AreEqual(SearchFieldType.Integer, types["fNumericInteger"]);
        }