Ejemplo n.º 1
0
        private static List<EquipmentDto> PhoneTestData_Ont(string expectedSubId, string expectedLocationId)
        {
            const string expectedSerialNumber = "MRCC12345678";
            const string expectedUnitAddress = "1234567";

            var type = new EquipmentTypeDto
            {
                ONTModel = new ONTModelDto
                {
                    BaseModel = "ONT1000M"
                },
                Category = EquipmentCategoryDto.ONTVoicePort
            };

            var ont = new List<EquipmentDto>
            {
                new EquipmentDto
                {
                    SerialNumber = expectedSerialNumber + "D01",
                    UnitAddress = expectedUnitAddress,
                    LocationId = expectedLocationId,
                    AssociatedSubscriberId = expectedSubId,
                    Type = new EquipmentTypeDto
                    {
                        ONTModel = new ONTModelDto
                        {
                            BaseModel = "ONT1000M"
                        },
                        Category = EquipmentCategoryDto.ONTDataPort
                    },
                    Status = "ACTIVE"
                },
                new EquipmentDto
                {
                    SerialNumber = expectedSerialNumber + "P01",
                    UnitAddress = expectedUnitAddress,
                    LocationId = expectedLocationId,
                    AssociatedSubscriberId = expectedSubId,
                    Type = type,
                    Status = "ACTIVE"
                },
                new EquipmentDto
                {
                    SerialNumber = expectedSerialNumber + "P02",
                    UnitAddress = expectedUnitAddress,
                    LocationId = expectedLocationId,
                    AssociatedSubscriberId = expectedSubId,
                    Type = type,
                    Status = "ACTIVE"
                }
            };
            return ont;
        }
Ejemplo n.º 2
0
 public static bool IsIptvDevice(EquipmentTypeDto type)
 {
     return (type != null) && type.IptvCapable;
 }
Ejemplo n.º 3
0
 public EquipmentDto()
 {
     Type = new EquipmentTypeDto();
     BlockedServiceList = new ServiceCollectionDto();
     CustomFields = new List<CustomFieldDto>();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// ValidateEquipmentModel method - takes EquipmentTypeDto objects
 /// </summary>
 /// <param name="expected"></param>
 /// <param name="actual"></param>
 public static void ValidateEquipmentModel(EquipmentTypeDto expected, EquipmentTypeDto actual)
 {
     if (expected == null)
     {
         return;
     }
     if (!string.IsNullOrEmpty(expected.Manufacturer))
     {
         Validate(expected.Manufacturer, actual.Manufacturer, TestAttribute.DeviceType);
     }
     if (!string.IsNullOrEmpty(expected.Model))
     {
         Validate(expected.Model, actual.Model, TestAttribute.Model);
     }
 }