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

            mock.InsertAllIPTCData();

            //Assert.That(mock.IPTCList.Count, Is.EqualTo(6));
            Assert.That(mock.IPTCList[4].Creator, Is.EqualTo("Batman"));
        }
Ejemplo n.º 2
0
        public void EXIFInfoByID()
        {
            MockDAL mock = new MockDAL();

            mock.InsertAllPictures();
            mock.InsertAllEXIFData();
            mock.InsertAllIPTCData();

            EXIFModel model = mock.GetEXIFInfoByID(3);

            Assert.That(model.Camera, Is.EqualTo("Canon"));
        }
Ejemplo n.º 3
0
        public void IPTCInfoByID()
        {
            MockDAL mock = new MockDAL();

            mock.InsertAllPictures();
            mock.InsertAllEXIFData();
            mock.InsertAllIPTCData();

            IPTCModel model = mock.GetIPTCInfoByID(2);

            Assert.That(model.Title, Is.EqualTo("anothertitle"));
        }
Ejemplo n.º 4
0
        public void AddTagsToPicture()
        {
            MockDAL mock = new MockDAL();

            mock.InsertAllPictures();
            mock.InsertAllEXIFData();
            mock.InsertAllIPTCData();

            mock.AddTagToPicture(5, "Batsignal");

            Assert.That(mock.Tags.Count, Is.EqualTo(1));
            Assert.That(mock.PictureList[4].Tags[0], Is.EqualTo("Batsignal"));
        }
Ejemplo n.º 5
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"));
        }
Ejemplo n.º 6
0
        public void AllIPTCModels()
        {
            List <IPTCModel> results = new List <IPTCModel>();
            MockDAL          mock    = new MockDAL();

            mock.InsertAllPictures();
            mock.InsertAllEXIFData();
            mock.InsertAllIPTCData();

            results = mock.ReturnAllIPTCModels();

            Assert.That(results.Count, Is.EqualTo(6));
        }
Ejemplo n.º 7
0
        public void SearchForPictures()
        {
            List <PictureModel> results = new List <PictureModel>();
            MockDAL             mock    = new MockDAL();

            mock.InsertAllPictures();
            mock.InsertAllEXIFData();
            mock.InsertAllIPTCData();

            results = mock.SearchForPictures("Title");

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

            mock.InsertAllPictures();
            mock.InsertAllEXIFData();
            mock.InsertAllIPTCData();

            int count_before = mock.PictureList.Count;

            mock.DeletePicture("IAmBatman");

            Assert.That(mock.PictureList.Count, Is.LessThan(count_before));
        }
Ejemplo n.º 9
0
        public void EditIPTCData()
        {
            List <string> data = new List <string> {
                "AmazingPicture", "Matschi", ""
            };
            MockDAL mock = new MockDAL();

            mock.InsertAllPictures();
            mock.InsertAllEXIFData();
            mock.InsertAllIPTCData();

            mock.EditIPTC(3, data);

            Assert.That(mock.IPTCList[2].Title, Is.EqualTo("AmazingPicture"));
        }
Ejemplo n.º 10
0
        public void EditEXIFData()
        {
            List <string> data = new List <string> {
                "Sony", "240x240", "01.01.2000 04:46:35", "Washington", "Amerika"
            };
            MockDAL mock = new MockDAL();

            mock.InsertAllPictures();
            mock.InsertAllEXIFData();
            mock.InsertAllIPTCData();

            mock.EditEXIF(4, data);

            Assert.That(mock.EXIFList[3].Camera, Is.EqualTo("Sony"));
        }
Ejemplo n.º 11
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.º 12
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));
        }