Ejemplo n.º 1
0
        public void CanParseReturnsExpectedResultWhenValueIsWellKnown()
        {
            var value  = _knownValues[new Random().Next(0, _knownValues.Length)];
            var result = RoadSegmentGeometryDrawMethod.CanParse(value);

            Assert.True(result);
        }
Ejemplo n.º 2
0
        public void CanParseReturnsExpectedResultWhenValueIsUnknown()
        {
            var value  = _fixture.Create <string>();
            var result = RoadSegmentGeometryDrawMethod.CanParse(value);

            Assert.False(result);
        }
Ejemplo n.º 3
0
        public void ToStringReturnsExpectedResult()
        {
            var value  = _knownValues[new Random().Next(0, _knownValues.Length)];
            var sut    = RoadSegmentGeometryDrawMethod.Parse(value);
            var result = sut.ToString();

            Assert.Equal(value, result);
        }
Ejemplo n.º 4
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());
        }
Ejemplo n.º 5
0
 public void CanParseValueCanNotBeNull()
 {
     Assert.Throws <ArgumentNullException>(() => RoadSegmentGeometryDrawMethod.CanParse(null));
 }
Ejemplo n.º 6
0
        public void ParseReturnsExpectedResultWhenValueIsUnknown()
        {
            var value = _fixture.Create <string>();

            Assert.Throws <FormatException>(() => RoadSegmentGeometryDrawMethod.Parse(value));
        }
Ejemplo n.º 7
0
        public void ParseReturnsExpectedResultWhenValueIsWellKnown()
        {
            var value = _knownValues[new Random().Next(0, _knownValues.Length)];

            Assert.NotNull(RoadSegmentGeometryDrawMethod.Parse(value));
        }