Example #1
0
        public void ResponseNonceGetter()
        {
            var responseAccessor = IndirectSignedResponse_Accessor.AttachShadow(this.response);
            IReplayProtectedProtocolMessage responseReplay = this.response;

            responseReplay.Nonce           = "UnIqUe";
            responseReplay.UtcCreationDate = this.creationDate;

            Assert.AreEqual(CreationDateString + "UnIqUe", responseAccessor.ResponseNonce);
            Assert.AreEqual("UnIqUe", responseReplay.Nonce);
            Assert.AreEqual(this.creationDate, responseReplay.UtcCreationDate);
        }
Example #2
0
        public void ResponseNonceSetter()
        {
            const string HybridValue      = CreationDateString + "UNIQUE";
            var          responseAccessor = IndirectSignedResponse_Accessor.AttachShadow(this.response);
            IReplayProtectedProtocolMessage responseReplay = this.response;

            responseAccessor.ResponseNonce = HybridValue;
            Assert.AreEqual(HybridValue, responseAccessor.ResponseNonce);
            Assert.AreEqual(this.creationDate, responseReplay.UtcCreationDate);
            Assert.AreEqual("UNIQUE", responseReplay.Nonce);

            responseAccessor.ResponseNonce = null;
            Assert.IsNull(responseReplay.Nonce);
        }