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

            using (BatchingNeoStores stores = batchingNeoStoresWithExternalPageCache(Storage.fileSystem(), Storage.pageCache(), NULL, Storage.directory().directory(), defaultFormat(), DEFAULT, Instance, EMPTY, defaults()))
            {
                // when
                RelationshipTypeCount[] relationshipTypeCounts = new RelationshipTypeCount[]
                {
                    new RelationshipTypeCount(0, 33),
                    new RelationshipTypeCount(1, 66)
                };
                DataStatistics dataStatistics = new DataStatistics(100123, 100456, relationshipTypeCounts);
                using (ImportLogic logic = new ImportLogic(Storage.directory().directory(), Storage.fileSystem(), stores, DEFAULT, Instance, monitor, defaultFormat(), NO_MONITOR))
                {
                    logic.PutState(dataStatistics);
                    logic.Success();
                }

                // then
                verify(monitor).done(eq(true), anyLong(), contains(dataStatistics.ToString()));
            }
        }