Exemple #1
0
        public void TryParse_ShouldReturnFalseWhenItCannotFindAFieldWithMatchingValue()
        {
            TestField actual;
            var       result = TestField.TryParse(0x99, out actual);

            Assert.Null(actual);
            Assert.False(result);
        }
Exemple #2
0
        public void TryParse_ShouldFindTheFirstFieldThatMatchesTheProvidedValueAndReturnTrue()
        {
            var expected = TestField.Field2;

            TestField actual;
            var       result = TestField.TryParse(expected.Value, out actual);

            Assert.Same(expected, actual);
            Assert.True(result);
        }