public void RegisterTBasLinks_ValidTBasLinkRegistrationInfoWithAllMandatoryParameters_RegistersTBasLinksSuccessfully()
        {
            MWC.TBasLinkRegistration tBasLinkRegistration = new MWC.TBasLinkRegistration
            {
                CallSign             = "WNVT",
                Channels             = new[] { 8, 23, 17 },
                StartDate            = DateTime.Today.ToString("MM-dd-yyyy"),
                EndDate              = DateTime.Today.AddDays(10).ToString("MM-dd-yyyy"),
                StartTime            = DateTime.Now.ToString("HH:mm:ss"),
                EndTime              = DateTime.Now.AddHours(2).ToString("HH:mm:ss"),
                RecieverLatitude     = "47.673988",
                RecieverLongitude    = "-122.121512",
                TransmitterLatitude  = "47.606209",
                TransmitterLongitude = "-122.332071",
                FriendlyName         = "TBAS Registration"
            };

            string actualResponse = this.whitespacesManager.RegisterTBasLinks(tBasLinkRegistration, accessToken);

            Assert.AreEqual("Device Registered successfully.", actualResponse);
        }
        public string RegisterTBasLinks(mwc.TBasLinkRegistration registrationInfo, string accessToken, string regionName = "United States")
        {
            Check.IsNotNull(registrationInfo, "Licensed LpAux Registration Info");
            Check.IsNotNull(accessToken, "Access Token");

            var strartDate = Convert.ToDateTime(registrationInfo.StartDate).Add(TimeSpan.Parse(registrationInfo.StartTime));
            var endDate    = Convert.ToDateTime(registrationInfo.EndDate).Add(TimeSpan.Parse(registrationInfo.EndTime));

            this.requestParams = this.GetRequestParams(
                req =>
            {
                req.AccessToken = accessToken;
                req.Params      = new Parameters
                {
                    IncumbentType = IncumbentType.TBAS.ToString(),
                    TvSpectrum    = new TvSpectrum
                    {
                        CallSign = registrationInfo.CallSign,
                        Channel  = registrationInfo.Channels[0]
                    },

                    TransmitLocation = new Location {
                        Latitude = Convert.ToDouble(registrationInfo.TransmitterLatitude), Longitude = Convert.ToDouble(registrationInfo.TransmitterLongitude)
                    },
                    TempBasLocation = new Location {
                        Latitude = Convert.ToDouble(registrationInfo.RecieverLatitude), Longitude = Convert.ToDouble(registrationInfo.RecieverLongitude)
                    },

                    Event = new Event
                    {
                        // Reoccurence logic need to implement here
                        Times = new Calendar[] { new Calendar {
                                                     Start = strartDate.ToString(), End = endDate.ToString(), Stamp = DateTime.Now.ToString()
                                                 } },
                        Channels = registrationInfo.Channels
                    },
                    Contact = new Whitespace.Entities.Versitcard.VCard
                    {
                        Address = new Whitespace.Entities.Versitcard.Address
                        {
                            Locality = registrationInfo.Address1,
                            Street   = registrationInfo.Address2,
                            Country  = registrationInfo.Country,
                            Region   = registrationInfo.City,
                        },
                        Email = new Whitespace.Entities.Versitcard.Email[] { new Whitespace.Entities.Versitcard.Email {
                                                                                 EmailAddress = registrationInfo.Email
                                                                             } },
                        Telephone = new Whitespace.Entities.Versitcard.Telephone[] { new Whitespace.Entities.Versitcard.Telephone {
                                                                                         TelephoneNumber = registrationInfo.Phone
                                                                                     } },
                        TimeZone = registrationInfo.TimeZone,
                        Title    = new Whitespace.Entities.Versitcard.Title {
                            Text = registrationInfo.FriendlyName
                        }
                    },

                    TempBASRegistrant = new Whitespace.Entities.Versitcard.VCard
                    {
                        Address = new Whitespace.Entities.Versitcard.Address
                        {
                            Locality = registrationInfo.Address1,
                            Street   = registrationInfo.Address2,
                            Country  = registrationInfo.Country,
                            Region   = registrationInfo.City,
                        },
                        Email = new Whitespace.Entities.Versitcard.Email[] { new Whitespace.Entities.Versitcard.Email {
                                                                                 EmailAddress = registrationInfo.Email
                                                                             } },
                        Org = new Whitespace.Entities.Versitcard.Organization {
                            OrganizationName = registrationInfo.FriendlyName
                        },
                        Telephone = new Whitespace.Entities.Versitcard.Telephone[] { new Whitespace.Entities.Versitcard.Telephone {
                                                                                         TelephoneNumber = registrationInfo.Phone
                                                                                     } },
                        TimeZone = registrationInfo.TimeZone,
                        Title    = new Whitespace.Entities.Versitcard.Title {
                            Text = registrationInfo.Description
                        }
                    },

                    // Channels need to capture
                };
            });

            return(this.whitespacesClient.AddIncumbent(this.requestParams).Message);
        }