コード例 #1
0
ファイル: tstBlog.cs プロジェクト: esiomb1/TDProject
        public void FindMethodOK()
        {
            //create an instance of the class we want to create
            clsBlog Ablog = new clsBlog();
            //boolean variable to store the result of the value
            Boolean Found = false;
            //create some test data to use with the method
            int BlogNo = 1;

            //invoke the method
            Found = Ablog.Find(BlogNo);
            //test to see the result is correct
            Assert.IsTrue(Found);
        }
コード例 #2
0
ファイル: tstBlog.cs プロジェクト: esiomb1/TDProject
        public void TestEmailFound()
        {
            //create an instance of the class we want to create
            clsBlog ABlog = new clsBlog();
            //boolean variable to store the result of the search
            Boolean Found = false;
            //boolean variable to record if data is OK
            Boolean OK = true;
            //create some test data to use with the method
            Int32 BlogNo = 1;

            //invoke the method
            Found = ABlog.Find(BlogNo);
            //check the address no
            if (ABlog.Email != "adminEmail")
            {
                OK = false;
            }
            //test to see that the result is correct
            Assert.IsTrue(OK);
        }