示例#1
0
        public static IList<ArchiveCount> LoadArchiveCount(IDataReader reader)
        {
            const string dateformat = "{0:00}/{1:00}/{2:0000}";
            string dt; //
            ArchiveCount ac;// new ArchiveCount();
            IList<ArchiveCount> acc = new Collection<ArchiveCount>();
            while(reader.Read())
            {
                ac = new ArchiveCount();
                dt = string.Format(CultureInfo.InvariantCulture, dateformat, ReadInt32(reader, "Month"),ReadInt32(reader, "Day"),ReadInt32(reader, "Year"));
                // FIX: BUG SF1423271 Archives Links
                ac.Date = DateTime.ParseExact(dt,"MM/dd/yyyy",CultureInfo.InvariantCulture);

                ac.Count = ReadInt32(reader, "Count");
                //TODO: This broke the unit tests: ac.Title = ReadString(reader, "Title");
                //TODO: This broke the unit tests: ac.Id = ReadInt32(reader, "Id");
                acc.Add(ac);
            }
            return acc;
        }
示例#2
0
 public void CanSetAndGetSimpleProperties()
 {
     ArchiveCount archive = new ArchiveCount();
     UnitTestHelper.AssertSimpleProperties(archive);
 }