Inheritance: CfBroadcastConfig
        public void FixtureSetup()
        {
            BroadcastServiceMock = MockRepository.GenerateStub<IBroadcastServicePortTypeClient>();
            Client = new SoapBroadcastClient(BroadcastServiceMock);
            ExpectedBroadcast = new CfBroadcast(1, "broadcast", CfBroadcastStatus.Running, DateTime.Now, CfBroadcastType.Voice, null);

            CreateExpectedBroadcast(1);

            LocalTimeZoneRestriction = new CfLocalTimeZoneRestriction(DateTime.Now, DateTime.Now);
            CfResult[] result = { CfResult.CarrierTempError };
            CfRetryPhoneType[] phoneTypes = { CfRetryPhoneType.FirstNumber };
            BroadcastConfigRestryConfig = new CfBroadcastConfigRetryConfig(1000, 2, result, phoneTypes);

            ExpectedVoiceBroadcastConfig = new CfVoiceBroadcastConfig(1, DateTime.Now, "fromNumber",
                null, BroadcastConfigRestryConfig, CfAnsweringMachineConfig.AmAndLive, "item",
                "liveSoundTextVoice", "item1", "machineSoundTextVoice", "item2", "tranferSoudnTextVoice", "1", "123456",
                "item3", "DncSoundTextVoice", "1", 5);
            ExpectedBroadcast.Item = ExpectedVoiceBroadcastConfig;

            CreateExpectedBroadcast(2);

            ExpectedVoiceBroadcastConfig.LocalTimeZoneRestriction = LocalTimeZoneRestriction;
            ExpectedVoiceBroadcastConfig.RetryConfig = null;
            ExpectedBroadcast.Item = ExpectedVoiceBroadcastConfig;

            CreateExpectedBroadcast(3);
        }
        public void FixtureSetup()
        {
            HttpClientMock = MockRepository.GenerateMock<IHttpClient>();
            Client = new RestBroadcastClient(HttpClientMock);

            ExpectedBroadcast = new CfBroadcast(1, "broadcast", CfBroadcastStatus.Running, DateTime.Now, CfBroadcastType.Voice, null);

            CreateExpectedBroadcast(1);

            LocalTimeZoneRestriction = new CfLocalTimeZoneRestriction(DateTime.Now, DateTime.Now);
            CfResult[] result = { CfResult.Received };
            CfRetryPhoneType[] phoneTypes = { CfRetryPhoneType.FirstNumber };
            BroadcastConfigRestryConfig = new CfBroadcastConfigRetryConfig(1000, 2, result, phoneTypes);

            ExpectedVoiceBroadcastConfig = new CfVoiceBroadcastConfig(1, DateTime.Now, "fromNumber",
                null, BroadcastConfigRestryConfig, CfAnsweringMachineConfig.AmAndLive, "item",
                "liveSoundTextVoice", "item1", "machineSoundTextVoice", "item2", "tranferSoudnTextVoice", "1", "123456",
                "item3", "DncSoundTextVoice", "1", 5);
            ExpectedBroadcast.Item = ExpectedVoiceBroadcastConfig;

            CreateExpectedBroadcast(2);

            ExpectedVoiceBroadcastConfig.LocalTimeZoneRestriction = LocalTimeZoneRestriction;
            ExpectedVoiceBroadcastConfig.RetryConfig = null;
            ExpectedBroadcast.Item = ExpectedVoiceBroadcastConfig;

            CreateExpectedBroadcast(3);

            var resource = new Resource { Resources = null };
            GetValue(10, resource);
        }
        public VoiceBroadcastConfig(CfVoiceBroadcastConfig source)
        {
            if (source.Id.HasValue)
            {
                id = source.Id.Value;
                idSpecified = true;
            }
            if (source.Created.HasValue)
            {
                Created = source.Created.Value;
                CreatedSpecified = true;
            }
            FromNumber = source.FromNumber;
            LocalTimeZoneRestriction = LocalTimeZoneRestrictionMapper.ToSoapLocalTimeZoneRestriction(source.LocalTimeZoneRestriction);
            RetryConfig = BroadcastConfigRetryConfigMapper.ToBroadcastConfigRetryConfig(source.RetryConfig);

            if (source.AnsweringMachineConfig.HasValue)
            {
                AnsweringMachineConfig = EnumeratedMapper.ToSoapEnumerated<AnsweringMachineConfig>(source.AnsweringMachineConfig.ToString());
                AnsweringMachineConfigSpecified = true;
            }
            Item = source.Item == null ? null : source.Item is string ? source.Item : Convert.ToInt64(source.Item);
            LiveSoundTextVoice = source.LiveSoundTextVoice;
            Item1 = source.Item1 == null ? null : source.Item1 is string ? source.Item1 : Convert.ToInt64(source.Item1);
            MachineSoundTextVoice = source.MachineSoundTextVoice;
            Item2 = source.Item2 == null ? null : source.Item2 is string ? source.Item2 : Convert.ToInt64(source.Item2);
            TransferSoundTextVoice = source.TransferSoundTextVoice;
            TransferDigit = source.TransferDigit;
            TransferNumber = source.TransferNumber;
            Item3 = source.Item3 == null ? null : source.Item3 is string ? source.Item3 : Convert.ToInt64(source.Item3);
            DncSoundTextVoice = source.DncSoundTextVoice;
            DncDigit = source.DncDigit;
            if (source.MaxActiveTransfers.HasValue)
            {
                MaxActiveTransfers = source.MaxActiveTransfers.Value;
                MaxActiveTransfersSpecified = true;
            }
        }
 internal static VoiceBroadcastConfig ToSoapVoiceBroadcastConfig(CfVoiceBroadcastConfig source)
 {
     return source == null ? null : new VoiceBroadcastConfig(source);
 }