コード例 #1
0
 public Broadcast(CfBroadcast source)
 {
     if (source.Id.HasValue)
     {
         id          = source.Id.Value;
         idSpecified = true;
     }
     Name = source.Name;
     if (source.Status.HasValue)
     {
         Status          = EnumeratedMapper.ToSoapEnumerated <BroadcastStatus>(source.Status.ToString());
         StatusSpecified = true;
     }
     if (source.LastModified.HasValue)
     {
         LastModified          = source.LastModified.Value;
         LastModifiedSpecified = true;
     }
     if (source.Type.HasValue)
     {
         Type          = EnumeratedMapper.ToSoapEnumerated <BroadcastType>(source.Type.ToString());
         Item          = BroadcastConfigMapper.ToBroadcastConfig(source.Item, source.Type.Value);
         TypeSpecified = true;
     }
 }
コード例 #2
0
 public SendCall(CfSendCall cfSendCall)
 {
     RequestId                = cfSendCall.RequestId;
     Type                     = EnumeratedMapper.ScreamingSnakeCase(cfSendCall.Type.ToString());
     BroadcastName            = cfSendCall.BroadcastName;
     ToNumber                 = ToNumberMapper.ToToNumber(cfSendCall.ToNumber);
     ScrubBroadcastDuplicates = cfSendCall.ScrubBroadcastDuplicates;
     Label                    = cfSendCall.Labels;
     Item                     = BroadcastConfigMapper.ToBroadcastConfig(cfSendCall.Item, cfSendCall.Type);
 }
コード例 #3
0
        private void CreateExpectedBroadcast(long broadcastId)
        {
            var lastModified      = ExpectedBroadcast.LastModified == null ? DateTime.Now : ExpectedBroadcast.LastModified.Value;
            var type              = ExpectedBroadcast.Type == null ? CfBroadcastType.Text : ExpectedBroadcast.Type.Value;
            var expectedBroadcast = new Broadcast(broadcastId, ExpectedBroadcast.Name,
                                                  EnumeratedMapper.ToSoapEnumerated <BroadcastStatus>(ExpectedBroadcast.Status.ToString()), lastModified,
                                                  EnumeratedMapper.ToSoapEnumerated <BroadcastType>(type.ToString()),
                                                  BroadcastConfigMapper.ToBroadcastConfig(ExpectedBroadcast.Item, type));

            BroadcastServiceMock
            .Stub(b => b.GetBroadcast(Arg <IdRequest> .Matches(x => x.Id == broadcastId)))
            .Return(expectedBroadcast);
        }
コード例 #4
0
        private void CreateExpectedBroadcast(long broadcastId)
        {
            var lastModified = ExpectedBroadcast.LastModified == null ? DateTime.Now : ExpectedBroadcast.LastModified.Value;
            var type         = ExpectedBroadcast.Type == null ? CfBroadcastType.Text : ExpectedBroadcast.Type.Value;

            var expectedBroadcast = new Broadcast(broadcastId, ExpectedBroadcast.Name,
                                                  EnumeratedMapper.ToSoapEnumerated <BroadcastStatus>(ExpectedBroadcast.Status.ToString()), lastModified,
                                                  EnumeratedMapper.ToSoapEnumerated <BroadcastType>(type.ToString()),
                                                  BroadcastConfigMapper.ToBroadcastConfig(ExpectedBroadcast.Item, type));

            var resource = new Resource {
                Resources = expectedBroadcast
            };

            GetValue(broadcastId, resource);
        }