public void TryParseReturnsExpectedResultWhenValueIsUnknown() { var value = _fixture.Create <string>(); var result = RoadSegmentGeometryDrawMethod.TryParse(value, out RoadSegmentGeometryDrawMethod parsed); Assert.False(result); Assert.Null(parsed); }
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()); }
public void TryParseValueCanNotBeNull() { Assert.Throws <ArgumentNullException>(() => RoadSegmentGeometryDrawMethod.TryParse(null, out _)); }