예제 #1
0
        public void ToString_NoArguments_ReturnString()
        {
            // Arrange

            // Act
            string stringRepresentation = _defaultCommand.ToString();

            // Assert
            AssertString.NotNullOrWhiteSpace(stringRepresentation);
        }
예제 #2
0
        public static bool GetSingleFlag(TypeCommand enums)
        {
            MemberInfo memberInfo = typeof(TypeCommand).GetMember(enums.ToString()).FirstOrDefault();

            if (memberInfo != null)
            {
                SingleAttribute attribute = (SingleAttribute)
                                            memberInfo.GetCustomAttributes(typeof(SingleAttribute), false).FirstOrDefault();

                if (attribute != null)
                {
                    return(true);
                }
            }

            return(false);
        }