public static long EstimatedStoreSize([email protected]_Estimates estimates, RecordFormats recordFormats) { long nodeSize = estimates.NumberOfNodes() * recordFormats.Node().getRecordSize(NO_STORE_HEADER); long relationshipSize = estimates.NumberOfRelationships() * recordFormats.Relationship().getRecordSize(NO_STORE_HEADER); long propertySize = estimates.SizeOfNodeProperties() + estimates.SizeOfRelationshipProperties(); long tempIdPropertySize = estimates.NumberOfNodes() * recordFormats.Property().getRecordSize(NO_STORE_HEADER); return(DefensivelyPadMemoryEstimate(nodeSize + relationshipSize + propertySize + tempIdPropertySize)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldWarnAboutCounthigherThanCapacity() public virtual void ShouldWarnAboutCounthigherThanCapacity() { // given RecordFormats formats = Standard.LATEST_RECORD_FORMATS; Monitor monitor = mock(typeof(Monitor)); Input_Estimates estimates = Inputs.KnownEstimates(formats.Node().MaxId * 2, formats.Relationship().MaxId * 2, 0, 0, 0, 0, 0); // we don't care about the rest of the estimates in this checking // when (new EstimationSanityChecker(formats, monitor)).SanityCheck(estimates); // then verify(monitor).mayExceedNodeIdCapacity(formats.Node().MaxId, estimates.NumberOfNodes()); verify(monitor).mayExceedRelationshipIdCapacity(formats.Relationship().MaxId, estimates.NumberOfRelationships()); }