コード例 #1
0
ファイル: TestModel.cs プロジェクト: GBatault/Fridge-ASP
 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
ファイル: TestModel.cs プロジェクト: GBatault/Fridge-ASP
 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
ファイル: TestModel.cs プロジェクト: GBatault/Fridge-ASP
 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
ファイル: TestModel.cs プロジェクト: GBatault/Fridge-ASP
 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
ファイル: TestModel.cs プロジェクト: GBatault/Fridge-ASP
        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);
            }

        }