Пример #1
0
        public void LoadArchiveCountParsesDateCorrectly()
        {
            var reader = new TestDataReader();
            reader.AddRecord(1, 2, 2005, 23);
            reader.AddRecord(1, 23, 2005, 23);

            ICollection<ArchiveCount> archive = DataHelper.ReadArchiveCount(reader);
            Assert.AreEqual(2, archive.Count, "Should only have two records.");

            ArchiveCount first = null;
            ArchiveCount second = null;

            foreach(ArchiveCount count in archive)
            {
                if(first == null)
                {
                    first = count;
                    continue;
                }

                if(second == null)
                {
                    second = count;
                    continue;
                }
            }

            Assert.AreEqual(DateTime.ParseExact("01/02/2005", "MM/dd/yyyy", CultureInfo.InvariantCulture), first.Date,
                            "Something happened to the date parsing.");
            Assert.AreEqual(DateTime.ParseExact("01/23/2005", "MM/dd/yyyy", CultureInfo.InvariantCulture), second.Date,
                            "Something happened to the date parsing.");
        }
Пример #2
0
 string GetUser(string key)
 {
     return(TestDataReader.GetData(key).Value);
 }
Пример #3
0
 public void TestFixtureSetup()
 {
     this._testDataReader      = new TestDataReader(@"..\..\Files\quickBooksOnline_consumerprofile.csv", @"..\..\Files\quickBooksOnline_restprofile.csv");
     NetcoLogger.LoggerFactory = new NLogLoggerFactory();
 }
Пример #4
0
 string GetRoute(string key)
 {
     return(TestDataReader.GetData(key).Value);
 }
Пример #5
0
 string GetUser(string key)
 {
     return TestDataReader.GetData(key);
 }