Beispiel #1
0
        public virtual void TestRenewDelegationTokenRequestPBImpl()
        {
            Token token = GetDelegationToken();
            RenewDelegationTokenRequestPBImpl original = new RenewDelegationTokenRequestPBImpl
                                                             ();

            original.SetDelegationToken(token);
            SecurityProtos.RenewDelegationTokenRequestProto protoType = original.GetProto();
            RenewDelegationTokenRequestPBImpl copy = new RenewDelegationTokenRequestPBImpl(protoType
                                                                                           );

            NUnit.Framework.Assert.IsNotNull(copy.GetDelegationToken());
            //compare source and converted
            NUnit.Framework.Assert.AreEqual(token, copy.GetDelegationToken());
        }
        /// <exception cref="Com.Google.Protobuf.ServiceException"/>
        public virtual SecurityProtos.RenewDelegationTokenResponseProto RenewDelegationToken
            (RpcController controller, SecurityProtos.RenewDelegationTokenRequestProto proto
            )
        {
            RenewDelegationTokenRequestPBImpl request = new RenewDelegationTokenRequestPBImpl
                                                            (proto);

            try
            {
                RenewDelegationTokenResponse response = real.RenewDelegationToken(request);
                return(((RenewDelegationTokenResponsePBImpl)response).GetProto());
            }
            catch (IOException e)
            {
                throw new ServiceException(e);
            }
        }