Beispiel #1
0
        private Domain.Entity.Construction.Component CreateComponent(ComponentType componentType)
        {
            var component = new Domain.Entity.Construction.Component
            {
                ConstructionStatus = PartConstructionStatus.Pending,
                InspectionStatus   = PartInspectionStatus.Pending,
                Certificate        = RndString(12),
                Length             = rnd.Next(1000),
                Number             = RndString(14),
                Type = componentType,
                IsAvailableToJoint = true,
                ToExport           = true,
                IsActive           = true
            };

            for (int j = 0; j < componentType.ConnectorsCount; j++)
            {
                var con = new Connector
                {
                    Component     = component,
                    Diameter      = rnd.Next(1217, 1221),
                    WallThickness = rnd.Next(40, 50),
                    IsActive      = true
                };
                component.Connectors.Add(con);
            }
            return(component);
        }
 private Domain.Entity.Construction.Component CreateComponent(ComponentType componentType)
 {
     var component = new Domain.Entity.Construction.Component
     {
         ConstructionStatus = PartConstructionStatus.Pending,
         InspectionStatus = PartInspectionStatus.Pending,
         Certificate = RndString(12),
         Length = rnd.Next(1000),
         Number = RndString(14),
         Type = componentType,
         IsAvailableToJoint = true,
         ToExport = true,
         IsActive = true
     };
     for(int j = 0; j < componentType.ConnectorsCount; j++)
     {
         var con = new Connector
         {
             Component = component,
             Diameter = rnd.Next(1217, 1221),
             WallThickness = rnd.Next(40, 50),
             IsActive = true
         };
         component.Connectors.Add(con);
     }
     return component;
 }