public void GetTeachingEvent_WhenTeachingEventExists_ReturnsTeachingEvent()
        {
            _mockService.Setup(mock => mock.CreateQuery("msevtmgt_event", _context))
            .Returns(MockTeachingEvents());

            var result = _crm.GetTeachingEvent("event_one");

            result.ReadableId.Should().Be("event_one");
        }
Esempio n. 2
0
        private bool BeUniqueReadableId(TeachingEventUpsertOperation operation)
        {
            var existingTeachingEvent = _crm.GetTeachingEvent(operation.ReadableId);

            if (existingTeachingEvent == null)
            {
                return(true);
            }

            if (existingTeachingEvent.Id == operation.Id)
            {
                return(true);
            }

            return(false);
        }