public void OnlineServiceTypeFilter_UnknownTypes_NoUnknownTypesReturn()
        {
            var dosResult1 = new Models.Models.Business.DosService
            {
                OnlineDOSServiceType = OnlineDOSServiceType.PublicPhone
            };
            var dosResult2 = new Models.Models.Business.DosService
            {
                OnlineDOSServiceType = OnlineDOSServiceType.GoTo
            };
            var dosResult3 = new Models.Models.Business.DosService
            {
                OnlineDOSServiceType = OnlineDOSServiceType.Callback
            };
            var dosResult4 = new Models.Models.Business.DosService
            {
                OnlineDOSServiceType = OnlineDOSServiceType.Unknown
            };

            var dosResultsList = new List <Models.Models.Business.DosService> {
                dosResult1, dosResult2, dosResult3, dosResult4
            };

            //Act
            var sut    = new OnlineServiceTypeFilter();
            var result = sut.FilterUnknownTypes(dosResultsList);

            Assert.AreEqual(3, result.Count);
            Assert.AreEqual(OnlineDOSServiceType.PublicPhone, result[0].OnlineDOSServiceType);
            Assert.AreEqual(OnlineDOSServiceType.GoTo, result[1].OnlineDOSServiceType);
            Assert.AreEqual(OnlineDOSServiceType.Callback, result[2].OnlineDOSServiceType);
        }
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            // Load the JSON for the Result into a JArray
            var servicesArray = JArray.Load(reader);
            var dosServices   = new List <Models.Models.Business.DosService>();

            foreach (var service in servicesArray)
            {
                var dosService = new Models.Models.Business.DosService(_clock);
                serializer.Populate(service.CreateReader(), dosService);
                dosServices.Add(dosService);
            }

            // Return the result
            return(dosServices);
        }