Пример #1
0
 public void getuserdetails_fail()
 {
     string userName = "******";
     SendMessageDAL sDAL = new SendMessageDAL();
     DataTable table = sDAL.getuserdetails_DAL(userName);
     int count = table.Rows.Count;
     Assert.IsTrue(count == 0);
 }
Пример #2
0
 public void getuserdetails()
 {
     string userName = "******";
     SendMessageDAL sDAL = new SendMessageDAL();
     DataTable table = sDAL.getuserdetails_DAL(userName);
     int count = table.Rows.Count;
     Assert.IsTrue(count > 0);
     //Assert.IsNotNull(sDAL.getuserdetails_DAL(userName));
 }
Пример #3
0
        public void InsertMessage1()
        {
            //Instialising the variables for the method

            string UserName = "******";
            string sender = "miunh";
            string subject = "This is subject";
            string body = "This is the body of the message";

            //creating instances for classes
            SendMessageDAL sDAL = new SendMessageDAL();
            try
            {
                sDAL.SendMessage_DAL(UserName, sender, subject, body);
                Assert.Fail("Expected exception");
            }
            catch (Exception)
            {
                // Expected
            }
        }
Пример #4
0
 public void Testgetuserlist()
 {
     SendMessageDAL sDAL = new SendMessageDAL();
     DataTable table = sDAL.getuserlist_DAL();
     int count = table.Rows.Count;
     Assert.IsTrue(count > 0);
 }
Пример #5
0
        public void InsertMessage7()
        {
            //Expected value for the test case to pass

            bool expected = true;

            //Instialising the variables for the method

            string UserName = "******";
            string sender = "abc12345";
            string subject = "";
            string body = "";

            //creating instances for classes
            SendMessageDAL sDAL = new SendMessageDAL();

            //getting return value from method

            bool Actual = sDAL.SendMessage_DAL(UserName, sender, subject, body);

            //actual testing

            Assert.AreEqual(expected, Actual);
        }