Beispiel #1
0
 private void LoadGrid()
 {
     try
     {
         AMC objAMC = new AMC();
         dataGridView1.DataSource       = objAMC.GetData(@"C:\amc.json");
         dataGridView1.Columns[2].Width = 200;
         dataGridView1.Columns[3].Width = 250;
     }
     catch (Exception ex)
     {
         label1.Text      = ex.Message;
         label1.ForeColor = Color.Red;
     }
 }
Beispiel #2
0
        public void TestData_Except()
        {
            AMC amc = new AMC();

            Assert.Throws <System.IO.FileNotFoundException>(() => amc.GetData(@"C:\amc1.json"));
        }
Beispiel #3
0
        public void TestData_Normal()
        {
            AMC amc = new AMC();

            Assert.IsNotNull(amc.GetData(@"C:\amc.json"));
        }