예제 #1
0
        public void ReturnsNullWhenGivenInvalidValue()
        {
            var boolResult = SmartFlagTestEnum.TryFromName("RandomString", out var result);

            Assert.False(boolResult);
            Assert.Null(result);
        }
예제 #2
0
        public void ReturnsIEnumerableWithSameValuesTryFromName()
        {
            var boolResult = SmartFlagTestEnum.TryFromName("One", out var result);

            Assert.True(boolResult);
            Assert.Equal(SmartFlagTestEnum.One, result.ToList()[0]);
        }