コード例 #1
0
        public void ToStringReturnsExpectedResult()
        {
            var value  = _knownValues[new Random().Next(0, _knownValues.Length)];
            var sut    = GradeSeparatedJunctionType.Parse(value);
            var result = sut.ToString();

            Assert.Equal(value, result);
        }
コード例 #2
0
        public void ParseReturnsExpectedResultWhenValueIsWellKnown()
        {
            var value = _knownValues[new Random().Next(0, _knownValues.Length)];

            Assert.NotNull(GradeSeparatedJunctionType.Parse(value));
        }
コード例 #3
0
        public void ParseReturnsExpectedResultWhenValueIsUnknown()
        {
            var value = _fixture.Create <string>();

            Assert.Throws <FormatException>(() => GradeSeparatedJunctionType.Parse(value));
        }
コード例 #4
0
 public void ParseValueCanNotBeNull()
 {
     Assert.Throws <ArgumentNullException>(() => GradeSeparatedJunctionType.Parse(null));
 }