public void Should_match_conversion_of_untyped_GUID_literal(string guid)
        {
            // given
            var literalNode = Node.ForLiteral(guid);

            // when
            var match = _converter.CanConvert(literalNode);

            // then
            match.LiteralFormatMatches.Should().Be(MatchResult.ExactMatch);
            match.DatatypeMatches.Should().Be(MatchResult.DontCare);
        }
Exemple #2
0
        public void ConvertToGuid_Success()
        {
            var guid = Guid.NewGuid();

            Assert.True(converter.CanConvert(guid.GetType()));

            var dict = converter.Convert(guid, settings);

            Assert.Equal(guid.ToString(), dict);

            var result = converter.ConvertBack(dict, settings);

            Assert.Equal(guid, result);
        }
Exemple #3
0
 public void Can_Convert_To_Type()
 {
     // Act + Assert
     Assert.True(_converter.CanConvert <Guid>(null)); // Input value does not matter, null is enough for the test.
 }