public override bool Filter(TestMethodDirection direction)
        {
            DMLibTransferDirection DMLibDirection = direction as DMLibTransferDirection;
            
            if (DMLibDirection == null)
            {
                throw new ArgumentException("DMLibDirectionFilter is only applicable to DMLibTransferDirection.", "direction");
            }

            if (this.IsAsync != null && this.IsAsync != DMLibDirection.IsAsync)
            {
                return false;
            }

            if (this.SourceType != DMLibDataType.Unspecified && !this.SourceType.HasFlag(DMLibDirection.SourceType))
            {
                return false;
            }

            if (this.DestType != DMLibDataType.Unspecified && !this.DestType.HasFlag(DMLibDirection.DestType))
            {
                return false;
            }

            return true;
        }
Beispiel #2
0
        public override bool Filter(TestMethodDirection direction)
        {
            DMLibTransferDirection DMLibDirection = direction as DMLibTransferDirection;

            if (DMLibDirection == null)
            {
                throw new ArgumentException("DMLibDirectionFilter is only applicable to DMLibTransferDirection.", "direction");
            }

            if (this.CopyMethod != null && this.CopyMethod != DMLibDirection.CopyMethod)
            {
                return(false);
            }

            if (this.SourceType != DMLibDataType.Unspecified && !this.SourceType.HasFlag(DMLibDirection.SourceType))
            {
                return(false);
            }

            if (this.DestType != DMLibDataType.Unspecified && !this.DestType.HasFlag(DMLibDirection.DestType))
            {
                return(false);
            }

            return(true);
        }
        private bool Filter(TestMethodDirection direction)
        {
            foreach(var directionFilter in this.directionFilters)
            {
                if (!directionFilter.Filter(direction))
                {
                    return false;
                }
            }

            return true;
        }
        private bool Filter(TestMethodDirection direction)
        {
            foreach (var directionFilter in this.directionFilters)
            {
                if (!directionFilter.Filter(direction))
                {
                    return(false);
                }
            }

            return(true);
        }
 public abstract bool Filter(TestMethodDirection direction);
Beispiel #6
0
 public abstract bool Filter(TestMethodDirection direction);
 private string GetGeneratedMethodName(MultiDirectionTestMethod testMethod, TestMethodDirection transferDirection)
 {
     // [MethodName]_[DirectionSuffix]
     return(String.Format("{0}_{1}", testMethod.MethodInfoObj.Name, transferDirection.GetTestMethodNameSuffix()));
 }
 private string GetGeneratedMethodName(MultiDirectionTestMethod testMethod, TestMethodDirection transferDirection)
 {
     // [MethodName]_[DirectionSuffix]
     return String.Format("{0}_{1}", testMethod.MethodInfoObj.Name, transferDirection.GetTestMethodNameSuffix());
 }