public void Test_SegmentRetirementQueueItem() { Guid projectGuid = Guid.NewGuid(); var item = new SegmentRetirementQueueItem { ProjectUID = projectGuid, InsertUTCAsLong = 1234567890, SegmentKeys = new ISubGridSpatialAffinityKey[] { new SubGridSpatialAffinityKey { Version = 123, ProjectUID = projectGuid, SubGridX = 12345, SubGridY = 67890, SegmentStartDateTicks = 123, SegmentEndDateTicks = 456 } } }; var result = SimpleBinarizableInstanceTester.TestClass(item, "Custom TAGFileBufferQueueItem not same after round trip serialisation"); Assert.True(result.member.ProjectUID.Equals(projectGuid) && result.member.InsertUTCAsLong.Equals(1234567890) && result.member.SegmentKeys.Length == 1 && result.member.SegmentKeys[0].SegmentStartDateTicks == 123 && result.member.SegmentKeys[0].SegmentEndDateTicks == 456 && result.member.SegmentKeys[0].ProjectUID.Equals(projectGuid) && result.member.SegmentKeys[0].SubGridX == 12345 && result.member.SegmentKeys[0].SubGridY == 67890 && result.member.SegmentKeys[0].Version == 123, "Post IEquality<T> comparer based comparison failure"); }
public void Test_RoleBasedServerNodeFilter() { var filter = new SegmentRetirementQueueQueryFilter(123456); var result = SimpleBinarizableInstanceTester.TestClass(filter, "Custom SegmentRetirementQueueQueryFilter not same after round trip serialisation"); Assert.True(result.member.retirementDateAsLong == 123456); }
public void ToFromBinary_SegmentRetirementQueueKey_WithProject() { SimpleBinarizableInstanceTester.TestClass(new SegmentRetirementQueueKey { ProjectUID = Guid.NewGuid() }, "SegmentRetirementQueueKey with project uid not same after round trip serialisation"); }
public void ToFromBinary_SegmentRetirementQueueKey_WithProjectAndDateTime() { SimpleBinarizableInstanceTester.TestClass(new SegmentRetirementQueueKey { ProjectUID = Guid.NewGuid(), InsertUTCAsLong = DateTime.UtcNow.Ticks }, "SegmentRetirementQueueKey with project uid and time not same after round trip serialisation"); }
public void Test_SiteModelMetadata() { var argument = new SiteModelMetadata { ID = Guid.NewGuid(), SiteModelExtent = BoundingWorldExtent3D.Full(), CreationDate = DateTime.UtcNow, LastModifiedDate = DateTime.UtcNow, MachineCount = 10, DesignCount = 5, SurveyedSurfaceCount = 3, AlignmentCount = 1 }; var result = SimpleBinarizableInstanceTester.TestClass(argument, "Custom SiteModelMetadata not same after round trip serialisation"); argument.LastModifiedDate.Should().Be(result.member.LastModifiedDate, "Dates are not equal"); }
public void Test_SubGridsRequestArgument() { var argument = new SubGridsRequestArgument() { TRexNodeID = Guid.NewGuid(), ProjectID = Guid.NewGuid(), Filters = new FilterSet(new CombinedFilter()), ReferenceDesign = new DesignOffset(Guid.NewGuid(), 1.5), RequestID = Guid.NewGuid(), GridDataType = GridDataType.CCV, ProdDataMaskBytes = new byte[] { 1, 5, 3, 7 }, SurveyedSurfaceOnlyMaskBytes = new byte[] { 0, 4, 1, 2 }, OriginatingIgniteNodeId = Guid.NewGuid(), IncludeSurveyedSurfaceInformation = true, AreaControlSet = new AreaControlSet(true, 12345, 6789, 3344, 5566, 44) }; SimpleBinarizableInstanceTester.TestClass(argument, "Custom SubGridsRequestArgument not same after round trip serialisation"); }
public void Test_TAGFileBufferQueueItem() { var testDate = DateTime.SpecifyKind(new DateTime(2000, 1, 1, 1, 1, 1, 1), DateTimeKind.Utc); var filter = new TAGFileBufferQueueItem { Content = new byte[] { 1, 10, 25, 100 }, InsertUTC = testDate, ProjectID = Guid.NewGuid(), AssetID = Guid.NewGuid(), IsJohnDoe = true, FileName = "fileName" }; var result = SimpleBinarizableInstanceTester.TestClass(filter, "Custom TAGFileBufferQueueItem not same after round trip serialisation"); Assert.True(result.member.FileName.Equals("fileName") && result.member.InsertUTC.Equals(testDate), "Post IEquality<T> comparer based comparison failure"); }
public void Test_SiteModelAttributesChangedEvent_WithNullMask() { var argument = new SiteModelAttributesChangedEvent { SiteModelID = Guid.NewGuid(), ExistenceMapModified = true, CsibModified = true, DesignsModified = true, SurveyedSurfacesModified = true, MachinesModified = true, MachineTargetValuesModified = true, MachineDesignsModified = true, ProofingRunsModified = true, AlignmentsModified = true, ExistenceMapChangeMask = null }; SimpleBinarizableInstanceTester.TestClass(argument, "Custom SiteModelAttributesChangedEvent not same after round trip serialisation"); }
public void Test_OverrideParameters_Custom() { var overrides = new OverrideParameters { OverrideMachineCCV = true, OverridingMachineCCV = 72, CMVRange = new CMVRangePercentageRecord(91, 108), OverrideMachineMDP = true, OverridingMachineMDP = 24, MDPRange = new MDPRangePercentageRecord(87, 123), OverridingTargetPassCountRange = new PassCountRangeRecord(3, 7), OverrideTargetPassCount = true, OverridingTemperatureWarningLevels = new TemperatureWarningLevelsRecord(250, 692), OverrideTemperatureWarningLevels = true, TargetMachineSpeed = new MachineSpeedExtendedRecord(12, 163), }; SimpleBinarizableInstanceTester.TestClass(overrides, "Custom override parameters not same after round trip serialisation"); }
public void Test_LiftParameters_Custom() { var liftParameters = new LiftParameters() { OverrideMachineThickness = true, LiftDetectionType = LiftDetectionType.Tagfile, LiftThicknessType = LiftThicknessType.Uncompacted, TargetLiftThickness = 0.2, MDPSummarizeTopLayerOnly = false, MDPSummaryTypes = MDPSummaryTypes.Thickness, CCVSummarizeTopLayerOnly = false, CCVSummaryTypes = CCVSummaryTypes.WorkInProgress, IncludeSuperseded = true, FirstPassThickness = 1.0f, DeadBandUpperBoundary = 0.8, DeadBandLowerBoundary = 0.3, BelowToleranceLiftThickness = 0.05, AboveToleranceLiftThickness = 0.95, OverridingLiftThickness = 0.5 }; SimpleBinarizableInstanceTester.TestClass(liftParameters, "Custom lift parameters not same after round trip serialisation"); }
public void Test_RoleBasedServerNodeFilter_Simple() { SimpleBinarizableInstanceTester.TestClass <SegmentRetirementQueueQueryFilter>("Empty SegmentRetirementQueueQueryFilter not same after round trip serialisation"); }
public void ToFromBinary_SegmentRetirementQueueKey_Simple() { SimpleBinarizableInstanceTester.TestClass <SegmentRetirementQueueKey>("Empty SegmentRetirementQueueKey not same after round trip serialisation"); }
public void Test_SubGridsRequestArgument_Simple() { SimpleBinarizableInstanceTester.TestClass <SubGridsRequestArgument>("Empty SubGridsRequestArgument not same after round trip serialisation"); }
public void Test_SiteModelMetadata_Simple() { SimpleBinarizableInstanceTester.TestClass <SiteModelMetadata>("Empty SiteModelMetadata not same after round trip serialisation"); }
public void Test_OverrideParameters_Defaults() { var overrides = new OverrideParameters(); SimpleBinarizableInstanceTester.TestClass(overrides, "Default override parameters not same after round trip serialisation"); }
public void Test_LiftParameters_Defaults() { var liftParameters = new LiftParameters(); SimpleBinarizableInstanceTester.TestClass(liftParameters, "Default lift parameters not same after round trip serialisation"); }
public void Test_SiteModelAttributesChangedEvent_Simple() { SimpleBinarizableInstanceTester.TestClass <SiteModelAttributesChangedEvent>("Empty SiteModelAttributesChangedEvent not same after round trip serialisation"); }
public void Test_TAGFileBufferQueueItem_Simple() { SimpleBinarizableInstanceTester.TestClass <TAGFileBufferQueueItem>("Empty TAGFileBufferQueueItem not same after round trip serialisation"); }
public void Test_PSNodeRoleBasedNodeFilter() { var filter = new PSNodeRoleBasedNodeFilter(); SimpleBinarizableInstanceTester.TestClass(filter, "Custom PSNodeRoleBasedNodeFilter not same after round trip serialisation"); }
public void Test_RoleBasedClientNodeFilter() { var filter = new RoleBasedClientNodeFilter("Role"); SimpleBinarizableInstanceTester.TestClass(filter, "Custom RoleBasedClientNodeFilter not same after round trip serialisation"); }
public void Test_SegmentRetirementQueueItem_Simple() { SimpleBinarizableInstanceTester.TestClass <SegmentRetirementQueueItem>("Empty SegmentRetirementQueueItem not same after round trip serialisation"); }
public void Test_OverrideParameters_Simple() { SimpleBinarizableInstanceTester.TestClass <OverrideParameters>("Empty override parameters not same after round trip serialisation"); }
public void Test_RoleBasedServerNodeFilter_Simple() { SimpleBinarizableInstanceTester.TestClass <RoleBasedServerNodeFilter>("Empty RoleBasedServerNodeFilter not same after round trip serialisation"); }
public void Test_LiftParameters_Simple() { SimpleBinarizableInstanceTester.TestClass <LiftParameters>("Empty lift parameters not same after round trip serialisation"); }