Ejemplo n.º 1
0
        public void CountPropertyOk()
        {
            clsFilmMoodCollection allFilmMoods = new clsFilmMoodCollection();
            Int32 count = 3685;

            allFilmMoods.Count = count;
            Assert.AreEqual(allFilmMoods.Count, count);
        }
        protected void btnAssignTag_Click(object sender, EventArgs e)
        {
            clsFilmMoodCollection aFilmMood = new clsFilmMoodCollection();

            aFilmMood.ThisFilmMood.UserId = Convert.ToInt32(Session["UserId"]);
            aFilmMood.ThisFilmMood.FilmId = Convert.ToInt32(Session["FilmId"]);
            aFilmMood.ThisFilmMood.MoodId = Convert.ToInt32(ddlFilmMoods.SelectedItem.Value);
            aFilmMood.Add();

            DisplayUserAssignedMoods();
        }
        protected void ImgbtnRemoveTag_Command(object sender, CommandEventArgs e)
        {
            clsFilmMoodCollection AllFilmMoods = new clsFilmMoodCollection();

            AllFilmMoods.ThisFilmMood.UserId = Convert.ToInt32(Session["UserId"]);
            AllFilmMoods.ThisFilmMood.FilmId = Convert.ToInt32(Session["FilmId"]);
            AllFilmMoods.ThisFilmMood.MoodId = Convert.ToInt32(e.CommandArgument);
            AllFilmMoods.Delete();

            DisplayUserAssignedMoods();
        }
Ejemplo n.º 4
0
        public void ThisFilmMoodPropertyOk()
        {
            clsFilmMoodCollection AllFilmMoods = new clsFilmMoodCollection();
            clsFilmMood           aFilmMood    = new clsFilmMood();

            aFilmMood.FilmId          = 1;
            aFilmMood.UserId          = 1;
            aFilmMood.MoodId          = 1;
            AllFilmMoods.ThisFilmMood = aFilmMood;
            Assert.AreEqual(AllFilmMoods.ThisFilmMood, aFilmMood);
        }
Ejemplo n.º 5
0
        public void AddMethodOk()
        {
            clsFilmMoodCollection AllFilmMoods = new clsFilmMoodCollection();
            clsFilmMood           TestItem     = new clsFilmMood();

            TestItem.FilmId           = 2;
            TestItem.UserId           = 1;
            TestItem.MoodId           = 2;
            AllFilmMoods.ThisFilmMood = TestItem;
            AllFilmMoods.Add();
            AllFilmMoods.ThisFilmMood.Find(TestItem.FilmId, TestItem.UserId, TestItem.MoodId);
        }
Ejemplo n.º 6
0
        public void CountMatchesList()
        {
            clsFilmMoodCollection filmMoods = new clsFilmMoodCollection();
            List <clsFilmMood>    testList  = new List <clsFilmMood>();
            clsFilmMood           testItem  = new clsFilmMood();

            testItem.FilmId = 1;
            testItem.MoodId = 1;
            testItem.UserId = 1;
            testList.Add(testItem);
            filmMoods.AllFilmMoods = testList;
            Assert.AreEqual(filmMoods.Count, testList.Count);
        }
Ejemplo n.º 7
0
        public void Delete()
        {
            clsFilmMoodCollection AllFilmMoods = new clsFilmMoodCollection();
            clsFilmMood           TestItem     = new clsFilmMood();

            TestItem.FilmId           = 1;
            TestItem.UserId           = 1;
            TestItem.MoodId           = 3;
            AllFilmMoods.ThisFilmMood = TestItem;
            AllFilmMoods.Add();

            AllFilmMoods.ThisFilmMood.Find(TestItem.FilmId, TestItem.UserId, TestItem.MoodId);
            AllFilmMoods.Delete();
            Boolean found = AllFilmMoods.ThisFilmMood.Find(TestItem.FilmId, TestItem.UserId, TestItem.MoodId);

            Assert.IsFalse(found);
        }
Ejemplo n.º 8
0
        public void InstanceOk()
        {
            clsFilmMoodCollection allFilmMoods = new clsFilmMoodCollection();

            Assert.IsNotNull(allFilmMoods);
        }