//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void getCurrentRoleFromRaftMachine() public virtual void getCurrentRoleFromRaftMachine() { when(_raftMachine.currentRole()).thenReturn(Role.LEADER, Role.FOLLOWER, Role.CANDIDATE); assertEquals("LEADER", _ccBean.Role); assertEquals("FOLLOWER", _ccBean.Role); assertEquals("CANDIDATE", _ccBean.Role); }
public override void AssertCanWrite() { Role currentRole = _raftMachine.currentRole(); if (!currentRole.Equals(Role.LEADER)) { throw new WriteOperationsNotAllowedException(format(NotLeaderErrorMsg, currentRole), Org.Neo4j.Kernel.Api.Exceptions.Status_Cluster.NotALeader); } }