Example #1
0
        public async Task EventDocumentER_TestGetEventDocument()
        {
            var eventDocumentObj = await EventDocumentER.GetEventDocumentER(1);

            Assert.NotNull(eventDocumentObj);
            Assert.IsType <EventDocumentER>(eventDocumentObj);
        }
Example #2
0
        public async Task EventDocumentER_TestDeleteObjectFromDatabase()
        {
            const int ID_TO_DELETE = 99;

            await EventDocumentER.DeleteEventDocumentER(ID_TO_DELETE);

            await Assert.ThrowsAsync <DataPortalException>(() => EventDocumentER.GetEventDocumentER(ID_TO_DELETE));
        }
Example #3
0
        public async Task EventDocumentER_TestUpdateExistingEventDocumentER()
        {
            var eventDocumentObj = await EventDocumentER.GetEventDocumentER(1);

            eventDocumentObj.Notes = "These are updated Notes";

            var result = await eventDocumentObj.SaveAsync();

            Assert.NotNull(result);
            Assert.Equal("These are updated Notes", result.Notes);
        }
Example #4
0
        public async Task EventDocumentER_UpdateEvent()
        {
            const string NOTES_UPDATE = "test child update";

            var eventDocument = await EventDocumentER.GetEventDocumentER(1);

            eventDocument.Event.Notes = NOTES_UPDATE;

            var result = await eventDocument.SaveAsync();

            Assert.NotNull(result);
            Assert.Equal(NOTES_UPDATE, result.Event.Notes);
        }