示例#1
0
        public void IdentitySeedSerializesCorrectly()
        {
            IdentitySeed seed = new IdentitySeed()
            {
                Seed = "1234567890"
            };

            string       json     = seed.ToJson();
            const string expected = @"{""cid"":false,""seed"":""1234567890""}";

            Assert.AreEqual(expected, json, "IdentitySeed serialization didn't match");
        }
示例#2
0
        public void IdentitySeedWithDidSerializesCorrectly()
        {
            IdentitySeed seed = new IdentitySeed()
            {
                Seed = "1234567890",
                Did  = "CnEDk9HrMnmiHXEV1WFgbVCRteYnPqsJwrTdcZaNhFVW"
            };

            string       json     = seed.ToJson();
            const string expected = @"{""cid"":false,""did"":""CnEDk9HrMnmiHXEV1WFgbVCRteYnPqsJwrTdcZaNhFVW"",""seed"":""1234567890""}";

            Assert.AreEqual(expected, json, "IdentitySeed serialization didn't match");
        }
示例#3
0
        public void IdentitySeedWithCryptoTypeSerializesCorrectly()
        {
            IdentitySeed seed = new IdentitySeed()
            {
                Seed       = "1234567890",
                CryptoType = "ed25519"
            };

            string       json     = seed.ToJson();
            const string expected = @"{""cid"":false,""crypto_type"":""ed25519"",""seed"":""1234567890""}";

            Assert.AreEqual(expected, json, "IdentitySeed serialization didn't match");
        }