Beispiel #1
0
        public void B_InsertEvent_InsertEventsCorrectly_ReturnsACountOf1()
        {
            StoryEvent storyEvent = new StoryEvent
            {
                Value    = DateTime.Now.ToLongTimeString() + "-" + "Picture Taken",
                DateTime = DateTime.Now,
                Finished = true
            };

            Card card = new Card
            {
                Message      = "test",
                StoryEventId = storyEvent.Id,
                Type         = "1"
            };

            Picture picture = new Picture
            {
                Path    = "Test",
                EventId = storyEvent.Id
            };

            List <Database.Models.VoiceRecording> voiceRecordings = new List <Database.Models.VoiceRecording>
            {
                new Database.Models.VoiceRecording
                {
                    Path    = "Test",
                    EventId = storyEvent.Id
                }
            };

            _db.CreateConnection();
            _db.Create();
            var expected = 1;
            var actual   = _db.InsertEvent(true, storyEvent, card, picture, voiceRecordings);

            Assert.AreEqual(expected, actual, "InsertEvent_InsertsPictureEventCorrectly_ReturnsACountOf1: Did not return a 1 to indicate a picture was added");
        }
Beispiel #2
0
 public void Setup()
 {
     _db = new Database.Database(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "ShareMyDay.db3");
     _db.Create();
     _storyGenerator = new StoryGeneration(_db, null);
 }