Пример #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.neo4j.helpers.AdvertisedSocketAddress primary() throws CatchupAddressResolutionException
        public override AdvertisedSocketAddress Primary()
        {
            try
            {
                MemberId leadMember = LeaderLocator.Leader;
                return(TopologyService.findCatchupAddress(leadMember).orElseThrow(() => new CatchupAddressResolutionException(leadMember)));
            }
            catch (NoLeaderFoundException e)
            {
                throw new CatchupAddressResolutionException(e);
            }
        }
Пример #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void commonMocking()
        public virtual void CommonMocking()
        {
            when(_localDatabase.storeId()).thenReturn(_storeId);
            when(_localDatabase.databaseLayout()).thenReturn(_databaseLayout);
            when(_topologyService.findCatchupAddress(_remoteMember)).thenReturn(_remoteAddress);
        }