コード例 #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
ファイル: User.cs プロジェクト: yaroshvichmaksim/epam_labs1
 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
ファイル: Route.cs プロジェクト: yaroshvichmaksim/epam_labs1
 string GetRoute(string key)
 {
     return(TestDataReader.GetData(key).Value);
 }
コード例 #5
0
ファイル: User.cs プロジェクト: Myrku/EpamLabs
 string GetUser(string key)
 {
     return TestDataReader.GetData(key);
 }