Beispiel #1
0
        public void TyrParse_StringValue_IsNotValid()
        {
            string str = "string";

            Assert.IsFalse(CryptographicSeed.TryParse(str, out CryptographicSeed val), "Valid");
            Assert.AreEqual(string.Empty, val.ToString(), "Value");
        }
Beispiel #2
0
        public void TyrParse_StringValue_IsValid()
        {
            string str = "string==";

            Assert.IsTrue(CryptographicSeed.TryParse(str, out CryptographicSeed val), "Valid");
            Assert.AreEqual(str, val.ToString(), "Value");
        }
Beispiel #3
0
        public void TyrParse_Null_IsValid()
        {
            string str = null;

            Assert.IsTrue(CryptographicSeed.TryParse(str, out CryptographicSeed val), "Valid");
            Assert.AreEqual(string.Empty, val.ToString(), "Value");
        }
        public void TyrParse_StringEmpty_IsValid()
        {
            CryptographicSeed val;

            string str = string.Empty;

            Assert.IsTrue(CryptographicSeed.TryParse(str, out val), "Valid");
            Assert.AreEqual(string.Empty, val.ToString(), "Value");
        }
Beispiel #5
0
        public void TryParse_TestStructInput_AreEqual()
        {
            using (new CultureInfoScope("en-GB"))
            {
                var exp = TestStruct;
                var act = CryptographicSeed.TryParse(exp.ToString());

                Assert.AreEqual(exp, act);
            }
        }
Beispiel #6
0
        public void TryParse_InvalidInput_DefaultValue()
        {
            using (new CultureInfoScope("en-GB"))
            {
                var exp = default(CryptographicSeed);
                var act = CryptographicSeed.TryParse("!");

                Assert.AreEqual(exp, act);
            }
        }