Exemple #1
0
        public void Test_Parse(string input)
        {
            // Arrange.
            var expected = Guid.Parse(input);

            // Act.
            var actual = _converter.Parse(new FieldParsingContext(input, null, typeof(Guid)));

            // Assert.
            Assert.Equal(expected, actual);
        }
Exemple #2
0
        public void Roundtrip2()
        {
            var guid = Guid.NewGuid();

            var conv = new GuidConverter("B");

            string?tmp = conv.ConvertToString(guid);

            Assert.IsNotNull(tmp);

            var now2 = (Guid?)conv.Parse(tmp);

            Assert.AreEqual(guid, now2);
        }
 public static Guid ParseGuid(Revenj.Utility.BufferedTextReader reader, int context)
 {
     return(GuidConverter.Parse(reader));
 }