예제 #1
0
        public void TestMethod_readFromExcel()
        {
            Brows brows = new Brows();
            
            //brows.filePath = "C:\\git\\C-_Project_ATT\\BugReports1.xls";
            brows.brows();
            OpenBugFile openBugFile = new OpenBugFile();
            
            MainWindow.bugForm.Number ="1";
            MainWindow.bugForm.Date = "8/1/2027";
            MainWindow.bugForm.Reference = "test";
            MainWindow.bugForm.Category = "test";
            MainWindow.bugForm.Status = "test";
            MainWindow.bugForm.Originator = "test";
            MainWindow.bugForm.Description = "test";
            MainWindow.bugForm.Attachment = "test";
            openBugFile.opens();
            AddTicket addTicket = new AddTicket();
            //addTicket.r = addTicket.ef1(1);
            addTicket.r = new Ticket();
            addTicket.r.ticketNo = MainWindow.bugForm.Number;
            string a = addTicket.r.ticketNo ;
            
            Assert.AreEqual(addTicket.r.ticketNo, "1");

        }
예제 #2
0
        //[ExpectedException(typeof(Exception),"some comment")]
        public void TestMethod_excepitnOnAddTicket()
        {
            try
            {
                AddTicket addTicket = new AddTicket();
                addTicket.AddReport();
            }
            catch (Exception e)
            {
                StringAssert.EndsWith(e.Message, "Exception");
                return;
            }
            Assert.Fail("No Exception .....Why?");
            //int a = 2;
            //var obj = addTicket.AddReport();
            //Assert.AreEqual(a, '2');   
            //Assert.IsNotNull(exception);

        }