コード例 #1
0
        public void ColumnNameEndsOnID()
        {
            Assert.AreEqual(0, StringUtils.AssumeIDColumn(null));
            Assert.AreEqual(0, StringUtils.AssumeIDColumn(" "));

            Assert.AreEqual(3, StringUtils.AssumeIDColumn("Rating ID"));
            Assert.AreEqual(2, StringUtils.AssumeIDColumn("RatingId"));
            Assert.AreEqual(0, StringUtils.AssumeIDColumn("Acid"));

            Assert.AreEqual(4, StringUtils.AssumeIDColumn("Rating Ref"));
            Assert.AreEqual(3, StringUtils.AssumeIDColumn("RatingRef"));

            Assert.AreEqual(5, StringUtils.AssumeIDColumn("Rating Text"));
            Assert.AreEqual(4, StringUtils.AssumeIDColumn("RatingText"));
            Assert.AreEqual(0, StringUtils.AssumeIDColumn("Videotext"));
        }