public virtual void TestConstructor() { Verifier verifier = new VerifierNone(); RpcAcceptedReply reply = new RpcAcceptedReply(0, RpcReply.ReplyState.MsgAccepted, verifier, RpcAcceptedReply.AcceptState.Success); Assert.Equal(0, reply.GetXid()); Assert.Equal(RpcMessage.Type.RpcReply, reply.GetMessageType()); Assert.Equal(RpcReply.ReplyState.MsgAccepted, reply.GetState() ); Assert.Equal(verifier, reply.GetVerifier()); Assert.Equal(RpcAcceptedReply.AcceptState.Success, reply.GetAcceptState ()); }
public virtual void TestConstructor() { Credentials credential = new CredentialsNone(); Verifier verifier = new VerifierNone(); int rpcVersion = RpcCall.RpcVersion; int program = 2; int version = 3; int procedure = 4; RpcCall call = new RpcCall(0, RpcMessage.Type.RpcCall, rpcVersion, program, version , procedure, credential, verifier); Assert.Equal(0, call.GetXid()); Assert.Equal(RpcMessage.Type.RpcCall, call.GetMessageType()); Assert.Equal(rpcVersion, call.GetRpcVersion()); Assert.Equal(program, call.GetProgram()); Assert.Equal(version, call.GetVersion()); Assert.Equal(procedure, call.GetProcedure()); Assert.Equal(credential, call.GetCredential()); Assert.Equal(verifier, call.GetVerifier()); }