示例#1
0
        public void ConstructorTestText2ParamsUnknownGuid()
        {
            var g = new GuidEx("ThisIsARandomText", GuidEx.NameSpaceUnknown);

            Assert.IsInstanceOfType(g, typeof(GuidEx));
            Assert.AreEqual(g.ToString(), "46526dd3-d88b-5da5-73ba-82023776e697");
        }
示例#2
0
        public void ConstructorTestText2Params()
        {
            var g = new GuidEx("ThisIsARandomText", "AnotherRandomText");

            Assert.IsInstanceOfType(g, typeof(GuidEx));
            Assert.AreEqual(g.ToString(), "ee436a5b-7af8-56d0-67a6-77b9e411fab7");
        }
示例#3
0
        public void ConstructorTestTextRandom()
        {
            var g = new GuidEx("ThisIsARandomText");

            Assert.IsInstanceOfType(g, typeof(GuidEx));
            Assert.AreEqual(g.ToString(), "46526dd3-d88b-5da5-73ba-82023776e697");
        }
示例#4
0
        public void ToStringFormatIFormatProvider()
        {
            var g  = new Guid("a7f9be96-3cb8-4c00-828a-ac0505e72eb2");
            var gx = new GuidEx(g);

            Assert.AreEqual(g.ToString("X", CultureInfo.GetCultureInfo("en-US")), gx.ToString("X", CultureInfo.GetCultureInfo("en-US")));
        }
示例#5
0
        public void ToStringFormat()
        {
            var g  = new Guid("a7f9be96-3cb8-4c00-828a-ac0505e72eb2");
            var gx = new GuidEx(g);

            Assert.AreEqual(g.ToString("X"), gx.ToString("X"));
        }
示例#6
0
        public void ConstructorTestText2ParamsTextGuid()
        {
            var g = new GuidEx("ThisIsARandomText", Guid.Parse("ed1dff6c-9c86-41be-9a3c-692526f7ecb7"));

            Assert.IsInstanceOfType(g, typeof(GuidEx));
            Assert.AreEqual(g.ToString(), "80e79921-b800-52a1-666a-5b924957d5fd");
        }
示例#7
0
        public void ConstructorTestTextGuid()
        {
            var guid = new Guid("{274ebe15-447b-4863-bf89-eb75c3653694}");
            var g    = new GuidEx(guid.ToString());

            Assert.IsInstanceOfType(g, typeof(GuidEx));
            Assert.AreEqual(g.ToString(), guid.ToString());
        }