Пример #1
0
 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);
     }
 }
Пример #2
0
 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);
     }
 }
Пример #3
0
 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);
     }
 }
Пример #4
0
 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);
     }
 }
Пример #5
0
        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);
            }

        }