示例#1
0
        //
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for UpdateObject
        ///</summary>
        public void UpdateObjectTestHelper <T>()
            where T : EntityObject
        {
            PrivateObject param0 = null;                                                  // TODO: Initialize to an appropriate value
            BaseGenericBLL_Accessor <T> target = new BaseGenericBLL_Accessor <T>(param0); // TODO: Initialize to an appropriate value
            T    entity      = default(T);                                                // TODO: Initialize to an appropriate value
            bool saveChanges = false;                                                     // TODO: Initialize to an appropriate value

            target.UpdateObject(entity, saveChanges);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
示例#2
0
        /// <summary>
        ///A test for GetObjects
        ///</summary>
        public void GetObjectsTest1Helper <T>()
            where T : EntityObject
        {
            PrivateObject param0 = null;                                                    // TODO: Initialize to an appropriate value
            BaseGenericBLL_Accessor <T> target   = new BaseGenericBLL_Accessor <T>(param0); // TODO: Initialize to an appropriate value
            ObjectQuery <T>             expected = null;                                    // TODO: Initialize to an appropriate value
            ObjectQuery <T>             actual;

            actual = target.GetObjects();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
示例#3
0
        /// <summary>
        ///A test for GetObjectByKey
        ///</summary>
        public void GetObjectByKeyTest2Helper <T>()
            where T : EntityObject
        {
            PrivateObject param0 = null;                                                  // TODO: Initialize to an appropriate value
            BaseGenericBLL_Accessor <T> target = new BaseGenericBLL_Accessor <T>(param0); // TODO: Initialize to an appropriate value
            T    entity   = default(T);                                                   // TODO: Initialize to an appropriate value
            bool lazyLoad = false;                                                        // TODO: Initialize to an appropriate value
            T    expected = default(T);                                                   // TODO: Initialize to an appropriate value
            T    actual;

            actual = target.GetObjectByKey(entity, lazyLoad);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
示例#4
0
        /// <summary>
        ///A test for GetQueryByPage
        ///</summary>
        public void GetQueryByPageTestHelper <T, E>()
            where T : EntityObject
        {
            PrivateObject param0 = null;                                                  // TODO: Initialize to an appropriate value
            BaseGenericBLL_Accessor <T> target = new BaseGenericBLL_Accessor <T>(param0); // TODO: Initialize to an appropriate value
            IQueryable <E> query             = null;                                      // TODO: Initialize to an appropriate value
            int            pageSize          = 0;                                         // TODO: Initialize to an appropriate value
            int            pageNumber        = 0;                                         // TODO: Initialize to an appropriate value
            int            pageCount         = 0;                                         // TODO: Initialize to an appropriate value
            int            pageCountExpected = 0;                                         // TODO: Initialize to an appropriate value
            IQueryable <E> expected          = null;                                      // TODO: Initialize to an appropriate value
            IQueryable <E> actual;

            actual = target.GetQueryByPage <E>(query, pageSize, pageNumber, out pageCount);
            Assert.AreEqual(pageCountExpected, pageCount);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }