//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void scanForHighIdOnlyOnceWhenProcessCache()
        internal virtual void ScanForHighIdOnlyOnceWhenProcessCache()
        {
            NeoStores      neoStores      = mock(typeof(NeoStores), Mockito.RETURNS_MOCKS);
            NodeStore      nodeStore      = mock(typeof(NodeStore));
            NodeRecord     nodeRecord     = mock(typeof(NodeRecord));
            StoreProcessor storeProcessor = mock(typeof(StoreProcessor));

            when(neoStores.NodeStore).thenReturn(nodeStore);
            when(nodeStore.HighId).thenReturn(10L);
            when(nodeStore.GetRecord(anyLong(), any(typeof(NodeRecord)), any(typeof(RecordLoad)))).thenReturn(nodeRecord);
            when(nodeStore.NewRecord()).thenReturn(nodeRecord);

            StoreAccess storeAccess = new StoreAccess(neoStores);

            storeAccess.Initialize();

            DefaultCacheAccess cacheAccess = new DefaultCacheAccess(Counts.NONE, 1);

            CacheTask.CheckNextRel cacheTask = new CacheTask.CheckNextRel(Org.Neo4j.Consistency.checking.full.Stage_Fields.SequentialForward, cacheAccess, storeAccess, storeProcessor);

            cacheAccess.CacheSlotSizes = CheckStage.Stage5_Check_NextRel.CacheSlotSizes;
            cacheTask.ProcessCache();

            verify(nodeStore, times(1)).HighId;
        }
 public RecordStore_DelegatorAnonymousInnerClass(StoreProcessorTest outerInstance, Org.Neo4j.Consistency.checking.full.StoreProcessor processor) : base(outerInstance.Stores.builder().build().NodeStore)
 {
     this.outerInstance = outerInstance;
     this._processor    = processor;
 }
Exemple #3
0
 public CheckNextRel(Stage stage, CacheAccess cacheAccess, StoreAccess storeAccess, StoreProcessor storeProcessor) : base(stage, cacheAccess)
 {
     this.StoreAccess    = storeAccess;
     this.StoreProcessor = storeProcessor;
 }