public void TestAuthentifier() { try { using (IDal dal = new Dal()) { string email = "*****@*****.**"; string password = "******"; User user = dal.authentifier(email, password); Assert.IsNotNull(user); } } catch (Exception ex) { throw new Exception(ex.Message); } }
public void testGetAllNote() { try { using (IDal dal = new Dal()) { List<Note> listNote = dal.getAllNotes(1); Assert.IsNotNull(listNote); } } catch (Exception ex) { throw new Exception(ex.Message); } }
public void TestCreateFridge() { try { using (IDal dal = new Dal()) { User user = dal.getUser(1); Assert.IsNotNull(user); int id = dal.createFridge("TESTGB", user); Assert.IsNotNull(id); Fridge fridge = dal.getFridge(id); Assert.IsNotNull(fridge); } } catch (Exception ex) { throw new Exception(ex.Message); } }
public void testAddNote() { try { using (IDal dal = new Dal()) { Note note = dal.addNote(1, "NoteGBT", "note"); Assert.IsNotNull(note); } } catch (Exception ex) { throw new Exception(ex.Message); } }
public void TestGetFridgeUser() { try { using (IDal dal = new Dal()) { User user = dal.getUser(1); Assert.IsNotNull(user); List<Fridge> fridges = dal.getFridgeUser(user); Assert.IsNotNull(fridges); } } catch (Exception ex) { throw new Exception(ex.Message); } }