Ejemplo n.º 1
0
        public void DeletePhotographer()
        {
            MockDAL mock = new MockDAL();

            mock.InsertAllPictures();
            mock.InsertAllEXIFData();
            mock.InsertAllIPTCData();
            mock.AddAndReturnPhotographer("John", "Wayne", "03.04.1981", "");
            mock.AddAndReturnPhotographer("Bruce", "Wayne", "03.04.1981", "");
            mock.AddAndReturnPhotographer("Homer", "Simpson", "03.04.1981", "");
            mock.AddAndReturnPhotographer("Peter", "Griffin", "03.04.1981", "");

            mock.DeletePhotographer("Homer", "Simpson");

            Assert.That(mock.PhotographerList.Count, Is.EqualTo(3));
        }
Ejemplo n.º 2
0
        public void GetAllPhotographersData()
        {
            MockDAL mock = new MockDAL();
            Dictionary <int, List <string> > allPhotographers = new Dictionary <int, List <string> >();

            mock.InsertAllPictures();
            mock.InsertAllEXIFData();
            mock.InsertAllIPTCData();
            mock.AddAndReturnPhotographer("Bruce", "Wayne", "01.19.2011", "");
            mock.AddAndReturnPhotographer("Homer", "Simpson", "01.19.2011", "");
            mock.AddAndReturnPhotographer("Peter", "Griffin", "01.19.2011", "");

            allPhotographers = mock.GetAllPhotographers();

            Assert.That(allPhotographers.Count, Is.EqualTo(3));
        }
Ejemplo n.º 3
0
        public void AddPhotographer()
        {
            MockDAL mock = new MockDAL();

            mock.AddAndReturnPhotographer("Bruce", "Wayne", "14.01.1993", "");

            Assert.That(mock.PhotographerList.Count, Is.EqualTo(1));
        }
Ejemplo n.º 4
0
        public void AssignPhotographerToPicture()
        {
            MockDAL mock = new MockDAL();

            mock.InsertAllPictures();
            mock.InsertAllEXIFData();
            mock.InsertAllIPTCData();
            mock.AddAndReturnPhotographer("Bruce", "Wayne", "01.01.1990", "");

            mock.AssignPhotographertoPicture(2, 1);

            Assert.That(mock.PictureList[1].Photographer.FirstName, Is.EqualTo("Bruce"));
        }