/// <summary>
        /// Return an appropriate inbound transducer for this type.
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public static AbstractInboundTransducer GetInbound(ItemType type)
        {
            AbstractInboundTransducer result;

            switch (type)
            {
            case ItemType.Call:
                result = new InboundCallTransducer();
                break;

            case ItemType.Contact:
                result = new InboundContactTransducer();
                break;

            case ItemType.Meeting:
                result = new InboundMeetingTransducer();
                break;

            case ItemType.Task:
                result = new InboundTaskTransducer();
                break;

            default:
                throw new ShouldNotHappenException("Unknown item type");
            }

            return(result);
        }
        public void CRMToOutlookTestMany()
        {
            InboundCallTransducer transducer = new InboundCallTransducer(new TestableItemManager());

            var result = transducer.JsonToItems(getEntryListResult);

            Assert.AreEqual(1, result.Count, 0, "Should read one record.");
            Assert.AreEqual("KS10 Appointment created in Outlook", result[0].Subject);
        }
        public void CRMToOutlookTest1()
        {
            InboundCallTransducer transducer = new InboundCallTransducer(new TestableItemManager());

            var result = transducer.JsonToItem(getEntryResult);

            Assert.AreEqual("KS10 Appointment created in Outlook", result.Subject);
            Assert.AreEqual(30, result.Duration);
        }