예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void flushStoreFilesWithCorrectCheckpointTriggerName() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void FlushStoreFilesWithCorrectCheckpointTriggerName()
        {
            CheckPointer             checkPointer = mock(typeof(CheckPointer));
            StoreCopyCheckPointMutex mutex        = new StoreCopyCheckPointMutex();

            NeoStoreDataSource dataSource = mock(typeof(NeoStoreDataSource));

            when(dataSource.StoreCopyCheckPointMutex).thenReturn(mutex);
            when(dataSource.ListStoreFiles(anyBoolean())).thenReturn(Iterators.emptyResourceIterator());

            DefaultMasterImplSPI master = new DefaultMasterImplSPI(mock(typeof(GraphDatabaseAPI), RETURNS_MOCKS), mock(typeof(FileSystemAbstraction)), new Monitors(), mockedTokenHolders(), mock(typeof(IdGeneratorFactory)), mock(typeof(TransactionCommitProcess)), checkPointer, mock(typeof(TransactionIdStore)), mock(typeof(LogicalTransactionStore)), dataSource, NullLogProvider.Instance);

            master.FlushStoresAndStreamStoreFiles(mock(typeof(StoreWriter)));

            TriggerInfo expectedTriggerInfo = new SimpleTriggerInfo(DefaultMasterImplSPI.STORE_COPY_CHECKPOINT_TRIGGER);

            verify(checkPointer).tryCheckPoint(expectedTriggerInfo);
        }
예제 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void checkPoint() throws java.io.IOException
        private void CheckPoint()
        {
            TriggerInfo triggerInfo = new SimpleTriggerInfo("test");

            _db.DependencyResolver.resolveDependency(typeof(CheckPointer)).forceCheckPoint(triggerInfo);
        }