Пример #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]);
        }