예제 #1
0
파일: Data.cs 프로젝트: borealwinter/simpl
 public static SubscriberDto GetSIMPLSubscriber03()
 {
     var loc = DefaultAddress("3001.0001");
     loc.CustomFields = DefaultCustomFields_Loc();
     RestoreLocation(loc);
     const string serial = "MRCC30010011";
     var equip = RestoreEquip(new EquipmentCriteriaDto { SerialNumber = serial, LocationId = loc.ID, Status = "ACTIVE", Model = "ONT1000M", UnitAddress = "EVRTWAXFOL2-18-4-10" });
     var svcs = DefaultServices_MOCA();
     var customFields = new List<CustomFieldDto>
     {
         new CustomFieldDto{Label ="Service_ID", Value=""},
         new CustomFieldDto{Label = "PCAN", Value=""},
         new CustomFieldDto{Label = "IP_TYPE", Value="DYNAMIC"},
         new CustomFieldDto{Label = "Sub_WTN", Value="3001000103"},
     };
     var phones = new List<PhoneDto>
     {
         new PhoneDto{ PhoneNumber = "3001000100", PhoneProvSpec = new PhoneProvSpecDto{ InterfaceGroup=1, CRV = 149, EquipmentId = serial+"P01"} } ,
         new PhoneDto{ PhoneNumber = "3001000101", PhoneProvSpec = new PhoneProvSpecDto{ InterfaceGroup=1, CRV = 149, EquipmentId = serial+"P02"} } ,
     };
     var vsp = new VoiceServiceProfileDto { PhoneLines = phones };
     var sub = new SubscriberDto
     {
         ID = "SIMPLTEST1",
         Name = "SIMPLTEST1",
         SubContactPhone = "3001000102",
         SubContactEmail = "*****@*****.**",
         CustomFields = customFields,
         Accounts = new List<AccountDto>
         {
             new AccountDto
             {
                 PPVCap = "75.00",
                 PPVResetDay = "5",
                 PPVPrivilege = "2",
                 PIN = "1234",
                 PinRequired = true,
                 ServiceEnabled = true,
                 Location = loc,
                 Services = svcs,
                 ServiceProfiles = new List<ServiceProfileDto>{vsp} } }
     };
     equip.ToList().ForEach(x => x.AssociatedSubscriberId = sub.ID);
     return RestoreSubscriber(sub);
 }
예제 #2
0
 /// <summary>
 /// ValidateVoiceServiceProfile method - takes VoiceServiceProfileDto objects
 /// </summary>
 /// <param name="expected"></param>
 /// <param name="actual"></param>
 public static void ValidateVoiceServiceProfile(VoiceServiceProfileDto expected, VoiceServiceProfileDto actual)
 {
     if (expected == null)
     {
         return;
     }
     if (expected.PhoneLines != null && expected.PhoneLines.Count > 0)
     {
         ValidatePhone(expected.PhoneLines, actual.PhoneLines);
     }
 }