示例#1
0
        public void TryParseReturnsExpectedResultWhenValueIsUnknown()
        {
            var value  = _fixture.Create <string>();
            var result = RoadSegmentGeometryDrawMethod.TryParse(value, out RoadSegmentGeometryDrawMethod parsed);

            Assert.False(result);
            Assert.Null(parsed);
        }
示例#2
0
        public void TryParseReturnsExpectedResultWhenValueIsWellKnown()
        {
            var value  = _knownValues[new Random().Next(0, _knownValues.Length)];
            var result = RoadSegmentGeometryDrawMethod.TryParse(value, out RoadSegmentGeometryDrawMethod parsed);

            Assert.True(result);
            Assert.NotNull(parsed);
            Assert.Equal(value, parsed.ToString());
        }
示例#3
0
 public void TryParseValueCanNotBeNull()
 {
     Assert.Throws <ArgumentNullException>(() => RoadSegmentGeometryDrawMethod.TryParse(null, out _));
 }