//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void recordWithReservedIdIsSkipped() public virtual void RecordWithReservedIdIsSkipped() { RecordStore <NodeRecord> store = mock(typeof(NodeStore)); StageControl stageControl = mock(typeof(StageControl)); UpdateRecordsStep <NodeRecord> step = new UpdateRecordsStep <NodeRecord>(stageControl, Configuration.DEFAULT, store, new StorePrepareIdSequence()); NodeRecord node1 = new NodeRecord(1); node1.InUse = true; NodeRecord node2 = new NodeRecord(2); node2.InUse = true; NodeRecord nodeWithReservedId = new NodeRecord(IdGeneratorImpl.INTEGER_MINUS_ONE); NodeRecord[] batch = new NodeRecord[] { node1, node2, nodeWithReservedId }; step.Process(batch, mock(typeof(BatchSender))); verify(store).prepareForCommit(eq(node1), any(typeof(IdSequence))); verify(store).updateRecord(node1); verify(store).prepareForCommit(eq(node2), any(typeof(IdSequence))); verify(store).updateRecord(node2); verify(store, never()).prepareForCommit(eq(nodeWithReservedId), any(typeof(IdSequence))); verify(store, never()).updateRecord(nodeWithReservedId); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void ioThroughputStatDoesNotOverflow() public virtual void IoThroughputStatDoesNotOverflow() { // store with huge record size to force overflow and not create huge batch of records RecordStore <NodeRecord> store = mock(typeof(RecordStore)); when(store.RecordSize).thenReturn(int.MaxValue / 2); Configuration configuration = mock(typeof(Configuration)); StageControl stageControl = mock(typeof(StageControl)); UpdateRecordsStep <NodeRecord> step = new UpdateRecordsStep <NodeRecord>(stageControl, configuration, store, new StorePrepareIdSequence()); NodeRecord record = new NodeRecord(1); record.InUse = true; NodeRecord[] batch = new NodeRecord[11]; Arrays.fill(batch, record); step.Process(batch, mock(typeof(BatchSender))); Stat stat = step.Stat(Keys.io_throughput); assertThat(stat.AsLong(), greaterThan(0L)); }
public ReadNodeIdsByCacheStep(StageControl control, Configuration config, NodeRelationshipCache cache, int nodeTypes) : base(control, config) { this._cache = cache; this._nodeTypes = nodeTypes; }
public PullingProducerStepAnonymousInnerClass(StageTest outerInstance, [email protected] control, Configuration config, long items) : base(control, config) { this.outerInstance = outerInstance; this._items = items; theObject = new object(); }
public RelationshipLinkforwardStep(StageControl control, Configuration config, NodeRelationshipCache cache, System.Predicate <RelationshipRecord> filter, int nodeTypes, params StatsProvider[] additionalStatsProvider) : base(control, config, cache, filter, nodeTypes, true, additionalStatsProvider) { }
public ForkedProcessorStepAnonymousInnerClass3(StressStage outerInstance, [email protected] control, Configuration config) : base(control, "Subject", config) { this.outerInstance = outerInstance; }
public PullingProducerStepAnonymousInnerClass(StressStage outerInstance, [email protected] control, Configuration config, int batches) : base(control, config) { this.outerInstance = outerInstance; this._batches = batches; }
public ForkedProcessorStepAnonymousInnerClass(ForkedProcessorStepTest outerInstance, [email protected] control, Configuration config, AtomicIntegerArray reference) : base(control, "Processor", config) { this.outerInstance = outerInstance; this._reference = reference; }