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(); } }
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(); } }