Пример #1
0
        public void ReadUserTest()
        {
            DbUser dbUser = new DbUser();
            User   user   = null;

            try
            {
                user = dbUser.FindById(1);
                Assert.IsNotNull(user);
            }
            catch (FaultException <UserNotFoundException> )
            {
                Assert.Fail();
            }
            catch (FaultException <DbConnectionException> )
            {
                Assert.Fail();
            }
        }
Пример #2
0
        public void UpdateUserTest()
        {
            DbUser dbUser = new DbUser();
            User   user   = null;

            try
            {
                user = dbUser.FindById(1);
                bool status = dbUser.Update(user);
                Assert.IsTrue(status);
            }
            catch (FaultException <UserNotFoundException> )
            {
                Assert.Fail();
            }
            catch (FaultException <DbConnectionException> )
            {
                Assert.Fail();
            }
        }