Пример #1
0
        public void testConstructorWithoutAttr()
        {
            Context           context      = TestHelpers.getContext();
            UpdateConfigsV0_6 testProtocol = UpdateConfigs.v0_6();

            JsonObject msg2 = testProtocol.statusMsg(context);

            testStatusMsg(msg2);
        }
Пример #2
0
        void updateConfigs()
        {
            string INSTITUTION_NAME = "Faber College";
            string LOGO_URL         = "https://freeiconshop.com/wp-content/uploads/edd/bank-flat.png";

            UpdateConfigsV0_6 updateConfigs = UpdateConfigs.v0_6(INSTITUTION_NAME, LOGO_URL);

            updateConfigs.update(context);
            updateConfigs.status(context);
        }
Пример #3
0
 public void testGetStatus()
 {
     withContext(context =>
     {
         UpdateConfigsV0_6 testProtocol = UpdateConfigs.v0_6();
         byte[] message             = testProtocol.statusMsgPacked(context);
         JsonObject unpackedMessage = TestHelpers.unpackForwardMessage(context, message);
         testStatusMsg(unpackedMessage);
     });
 }
Пример #4
0
 public void testUpdate()
 {
     withContext(context =>
     {
         UpdateConfigsV0_6 testProtocol = UpdateConfigs.v0_6(name, logoUrl);
         byte[] message             = testProtocol.updateMsgPacked(context);
         JsonObject unpackedMessage = TestHelpers.unpackForwardMessage(context, message);
         testUpdateMsgMessages(unpackedMessage);
     });
 }
Пример #5
0
        public void testGetMessageType()
        {
            UpdateConfigsV0_6 testProtocol = UpdateConfigs.v0_6(name, logoUrl);
            string            msgName      = "msg name";

            Assert.AreEqual(Util.getMessageType(
                                Util.EVERNYM_MSG_QUALIFIER,
                                testProtocol.family(),
                                testProtocol.version(),
                                msgName
                                ), testProtocol.messageType(msgName));
        }
Пример #6
0
        public void testConstructorWithAttr()
        {
            Context           context      = TestHelpers.getContext();
            UpdateConfigsV0_6 testProtocol = UpdateConfigs.v0_6(name, logoUrl);

            JsonObject msg = testProtocol.updateMsg(context);

            testUpdateMsgMessages(msg);

            JsonObject msg2 = testProtocol.statusMsg(context);

            testStatusMsg(msg2);
        }
Пример #7
0
        public void testGetThreadId()
        {
            UpdateConfigsV0_6 testProtocol = UpdateConfigs.v0_6(name, logoUrl);

            Assert.IsNotNull(testProtocol.getThreadId());
        }