コード例 #1
0
 internal static MessageStatus WorkAroundQueryFileSystemInfo(FileSystemInfoClass fileInfoClass, OutputBufferSize outBufSmall, MessageStatus returnedStatus, ref FsInfoByteCount byteCount, ITestSite site)
 {
     if (fileInfoClass == FileSystemInfoClass.File_FsObjectId_Information && returnedStatus == MessageStatus.OBJECT_NAME_NOT_FOUND)
     {
         returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(2674, MessageStatus.SUCCESS, returnedStatus, site);
         byteCount      = FsInfoByteCount.SizeOf_FILE_FS_OBJECTID_INFORMATION;
     }
     return(returnedStatus);
 }
        public static MessageStatus QueryFileSystemInfo(
            FileSystemInfoClass fileInfoClass,
            OutputBufferSize outBufSmall,
            out FsInfoByteCount byteCount)
        {
            byteCount = FsInfoByteCount.Zero;

            switch (fileInfoClass)
            {
                #region 3.1.5.12.1    FileFsVolumeInformation

                case (FileSystemInfoClass.File_FsVolumeInformation):
                    {
                        // If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_VOLUME_INFORMATION.VolumeLabel ), 8 )
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(2638, @"[In FileFsVolumeInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_VOLUME_INFORMATION.VolumeLabel ), 8 ), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Requirement.Capture(@"[2.1.5.12.1 FileFsVolumeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return: ByteCount set to FieldOffset(FILE_FS_VOLUME_INFORMATION.VolumeLabel) + BytesToCopy.");
                        byteCount = FsInfoByteCount.FieldOffset_FILE_FS_VOLUME_INFORMATION_VolumeLabel_Add_BytesToCopy;

                        Requirement.Capture(@"[2.1.5.12.1 FileFsVolumeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return: Status set to STATUS_BUFFER_OVERFLOW if BytesToCopy < OutputBuffer.VolumeLabelLength else STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 3.1.5.12.2    FileFsLabelInformation //3.1.5.12.9    FileFsDriverPathInformation

                case (FileSystemInfoClass.File_FsLabelInformation):
                    {
                        Helper.CaptureRequirement(2751, @"[MS-FSCC] section 2.5, FileFsLabelInformation is intended for local use only. Query request does not match the usage, STATUS_INVALID_INFO_CLASS is returned.");
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                case (FileSystemInfoClass.File_FsDriverPath_Information):
                    {
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Requirement.Capture(@"[2.1.5.12.4   FileFsDeviceInformation, Pseudocode for the operation is as follows:]
                                If OutputBufferSize is smaller than sizeof(FILE_FS_DRIVER_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Helper.CaptureRequirement(2764, @"[In FileFsDriverPathInformation]This operation MUST be failed with STATUS_NOT_SUPPORTED.");
                        return MessageStatus.NOT_SUPPORTED;

                    }

                #endregion

                #region 3.1.5.12.3    FileFsSizeInformation //3.1.5.12.7    FileFsFullSizeInformation

                case (FileSystemInfoClass.File_FsSizeInformation):
                    {
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Requirement.Capture(@"[2.1.5.12.3 FileFsSizeInformation] Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_FS_SIZE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Helper.CaptureRequirement(2672, @"[In FileFsSizeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount MUST be set to sizeof(FILE_FS_SIZE_INFORMATION).");
                        byteCount = FsInfoByteCount.SizeOf_FILE_FS_SIZE_INFORMATION;

                        Helper.CaptureRequirement(2673, @"[In FileFsSizeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }

                case (FileSystemInfoClass.File_FsFullSize_Information):
                    {
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Requirement.Capture(@"[2.1.5.12.7 FileFsFullSizeInformation] Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_FS_FULL_SIZE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Helper.CaptureRequirement(2729, @"[In FileFsFullSizeInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_FS_FULL_SIZE_INFORMATION ).");
                        byteCount = FsInfoByteCount.SizeOf_FILE_FS_FULL_SIZE_INFORMATION;

                        Helper.CaptureRequirement(2730, @"[In FileFsFullSizeInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 3.1.5.12.4    FileFsDeviceInformation

                case (FileSystemInfoClass.File_FsDevice_Information):
                    {
                        // If OutputBufferSize is smaller than sizeof( FILE_FS_DEVICE_INFORMATION )
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Requirement.Capture(@"[2.1.5.12.4 FileFsDeviceInformation] Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_FS_DEVICE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Helper.CaptureRequirement(2753, @"[In FileFsDeviceInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_FS_DEVICE_INFORMATION ).");
                        byteCount = FsInfoByteCount.SizeOf_FILE_FS_DEVICE_INFORMATION;

                        Helper.CaptureRequirement(2680, @"[In FileFsDeviceInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 3.1.5.12.5    FileFsAttributeInformation
                case (FileSystemInfoClass.File_FsAttribute_Information):
                    {
                        //If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_ATTRIBUTE_INFORMATION.FileSystemName ), 4 )
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(2691, @"[In FileFsAttributeInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_ATTRIBUTE_INFORMATION.FileSystemName ), 4 ),
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Requirement.Capture(@"[2.1.5.12.5 FileFsAttributeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: ByteCount set to FieldOffset(FILE_FS_ATTRIBUTE_INFORMATION.FileSystemName) + BytesToCopy.");
                        byteCount = FsInfoByteCount.FieldOffset_FILE_FS_ATTRIBUTE_INFORMATION_FileSystemName_Add_BytesToCopy;

                        Requirement.Capture(@"[2.1.5.12.5 FileFsAttributeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: Status set to STATUS_BUFFER_OVERFLOW if BytesToCopy < OutputBuffer.FileSystemNameLength else STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }
                #endregion

                #region 3.1.5.12.6    FileFsControlInformation

                case (FileSystemInfoClass.File_FsControlInformation):
                    {
                        // If OutputBufferSize is smaller than BlockAlign( sizeof( FILE_FS_CONTROL_INFORMATION ), 8 )
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(2707, @"[In FileFsControlInformation] Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than BlockAlign( sizeof( FILE_FS_CONTROL_INFORMATION ), 8 ) the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        if (!gIsImplementQueryFileFsControlInformation)
                        {
                            Helper.CaptureRequirement(7802, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:]
                                If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_PARAMETER.");
                            return MessageStatus.INVALID_PARAMETER;
                        }

                        if (!gisQuotasSupported)
                        {
                            Helper.CaptureRequirement(7803, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:]
                                If Open.File.Volume.IsQuotasSupported is FALSE, the operation MUST be failed with STATUS_VOLUME_NOT_UPGRADED");
                            return MessageStatus.VOLUME_NOT_UPGRADED;
                        }

                        Helper.CaptureRequirement(2715, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof(FILE_FS_CONTROL_INFORMATION).");
                        byteCount = FsInfoByteCount.SizeOf_FILE_FS_CONTROL_INFORMATION;

                        Helper.CaptureRequirement(2716, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 3.1.5.12.8    FileFsObjectIdInformation

                case (FileSystemInfoClass.File_FsObjectId_Information):
                    {
                        // If OutputBufferSize is less than the size of FILE_FS_OBJECTID_INFORMATION
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(2755, @"[In FileFsObjectIdInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is less than sizeof( FILE_FS_OBJECTID_INFORMATION ),
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        if (!gIsImplementQueryFileFsObjectIdInformation)
                        {
                            Helper.CaptureRequirement(4811, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:]
                                If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_PARAMETER.");
                            return MessageStatus.INVALID_PARAMETER;
                        }

                        if (!gisObjectIDsSupported)
                        {
                            Helper.CaptureRequirement(4812, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:]
                                If Open.File.Volume.IsObjectIDsSupported is FALSE, the operation MUST be failed with STATUS_VOLUME_NOT_UPGRADED.");
                            return MessageStatus.VOLUME_NOT_UPGRADED;
                        }

                        Helper.CaptureRequirement(2761, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_FS_OBJECTID_INFORMATION ).");
                        byteCount = FsInfoByteCount.SizeOf_FILE_FS_OBJECTID_INFORMATION;

                        Helper.CaptureRequirement(2762, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 2.1.5.12.10   FileFsSectorSizeInformation

                case (FileSystemInfoClass.File_FsSectorSizeInformation):
                    {
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Requirement.Capture(@"[2.1.5.12.10 FileFsSectorSizeInformation], Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_FS_SECTOR_SIZE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Requirement.Capture(@"[2.1.5.12.10 FileFsSectorSizeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: ByteCount set to the size of the FILE_FS_SECTOR_SIZE_INFORMATION structure.");
                        byteCount = FsInfoByteCount.SizeOf_FILE_FS_SECTOR_SIZE_INFORMATION;

                        Requirement.Capture(@"[2.1.5.12.10 FileFsSectorSizeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: Status set to STATUS_SUCCESS.");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region Information Class which is not defined in MS-FSCC
                case FileSystemInfoClass.Zero:
                    {
                        Requirement.Capture(@"[MS-FSCC 2.5 File System Information Classes] If an Information Class is specified that does not match the usage in the above table, STATUS_INVALID_INFO_CLASS MUST be returned.");
                        return MessageStatus.INVALID_INFO_CLASS;
                    }
                case FileSystemInfoClass.NOT_DEFINED_IN_FSCC:
                    {
                        if (outBufSmall == OutputBufferSize.LessThan)
                        {
                            Requirement.Capture(@"Negative test with artificial FileSystemInfoClass.NOT_DEFINED_IN_FSCC:
                                If OutputBufferSize is smaller than sizeof(NOT_DEFINED_IN_FSCC), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        Requirement.Capture(@"[MS-SMB2 section 3.3.5.20.2 Handling SMB2_0_INFO_FILESYSTEM] If the store does not support the data requested, the server MUST fail the request with STATUS_NOT_SUPPORTED.");
                        return MessageStatus.NOT_SUPPORTED;
                    }
                #endregion

                default:
                    break;
            }

            Helper.CaptureRequirement(2630, @"[In Application Requests a Query of File System Information]On completion, the object store MUST return:
                [Status,OutputBuffer,ByteCount].");
            return MessageStatus.SUCCESS;
        }
        public static MessageStatus QueryFileSystemInfo(
            FileSystemInfoClass fileInfoClass,
            OutputBufferSize outBufSmall,
            out FsInfoByteCount byteCount)
        {
            byteCount = FsInfoByteCount.Zero;

            switch (fileInfoClass)
            {
                #region 3.1.5.12.1    FileFsVolumeInformation

            case (FileSystemInfoClass.File_FsVolumeInformation):
            {
                // If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_VOLUME_INFORMATION.VolumeLabel ), 8 )
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Helper.CaptureRequirement(2638, @"[In FileFsVolumeInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_VOLUME_INFORMATION.VolumeLabel ), 8 ), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Requirement.Capture(@"[2.1.5.12.1 FileFsVolumeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return: ByteCount set to FieldOffset(FILE_FS_VOLUME_INFORMATION.VolumeLabel) + BytesToCopy.");
                byteCount = FsInfoByteCount.FieldOffset_FILE_FS_VOLUME_INFORMATION_VolumeLabel_Add_BytesToCopy;

                Requirement.Capture(@"[2.1.5.12.1 FileFsVolumeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return: Status set to STATUS_BUFFER_OVERFLOW if BytesToCopy < OutputBuffer.VolumeLabelLength else STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }

                #endregion

                #region 3.1.5.12.2    FileFsLabelInformation //3.1.5.12.9    FileFsDriverPathInformation

            case (FileSystemInfoClass.File_FsLabelInformation):
            {
                Helper.CaptureRequirement(2751, @"[MS-FSCC] section 2.5, FileFsLabelInformation is intended for local use only. Query request does not match the usage, STATUS_INVALID_INFO_CLASS is returned.");
                return(MessageStatus.INVALID_INFO_CLASS);
            }

            case (FileSystemInfoClass.File_FsDriverPath_Information):
            {
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Requirement.Capture(@"[2.1.5.12.4   FileFsDeviceInformation, Pseudocode for the operation is as follows:]
                                If OutputBufferSize is smaller than sizeof(FILE_FS_DRIVER_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Helper.CaptureRequirement(2764, @"[In FileFsDriverPathInformation]This operation MUST be failed with STATUS_NOT_SUPPORTED.");
                return(MessageStatus.NOT_SUPPORTED);
            }

                #endregion

                #region 3.1.5.12.3    FileFsSizeInformation //3.1.5.12.7    FileFsFullSizeInformation

            case (FileSystemInfoClass.File_FsSizeInformation):
            {
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Requirement.Capture(@"[2.1.5.12.3 FileFsSizeInformation] Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_FS_SIZE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Helper.CaptureRequirement(2672, @"[In FileFsSizeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount MUST be set to sizeof(FILE_FS_SIZE_INFORMATION).");
                byteCount = FsInfoByteCount.SizeOf_FILE_FS_SIZE_INFORMATION;

                Helper.CaptureRequirement(2673, @"[In FileFsSizeInformation, Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }

            case (FileSystemInfoClass.File_FsFullSize_Information):
            {
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Requirement.Capture(@"[2.1.5.12.7 FileFsFullSizeInformation] Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_FS_FULL_SIZE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Helper.CaptureRequirement(2729, @"[In FileFsFullSizeInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_FS_FULL_SIZE_INFORMATION ).");
                byteCount = FsInfoByteCount.SizeOf_FILE_FS_FULL_SIZE_INFORMATION;

                Helper.CaptureRequirement(2730, @"[In FileFsFullSizeInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }

                #endregion

                #region 3.1.5.12.4    FileFsDeviceInformation

            case (FileSystemInfoClass.File_FsDevice_Information):
            {
                // If OutputBufferSize is smaller than sizeof( FILE_FS_DEVICE_INFORMATION )
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Requirement.Capture(@"[2.1.5.12.4 FileFsDeviceInformation] Pseudocode for the operation is as follows: 
                                If OutputBufferSize is smaller than sizeof(FILE_FS_DEVICE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Helper.CaptureRequirement(2753, @"[In FileFsDeviceInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_FS_DEVICE_INFORMATION ).");
                byteCount = FsInfoByteCount.SizeOf_FILE_FS_DEVICE_INFORMATION;

                Helper.CaptureRequirement(2680, @"[In FileFsDeviceInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }

                #endregion

                #region 3.1.5.12.5    FileFsAttributeInformation
            case (FileSystemInfoClass.File_FsAttribute_Information):
            {
                //If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_ATTRIBUTE_INFORMATION.FileSystemName ), 4 )
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Helper.CaptureRequirement(2691, @"[In FileFsAttributeInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_FS_ATTRIBUTE_INFORMATION.FileSystemName ), 4 ), 
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Requirement.Capture(@"[2.1.5.12.5 FileFsAttributeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: ByteCount set to FieldOffset(FILE_FS_ATTRIBUTE_INFORMATION.FileSystemName) + BytesToCopy.");
                byteCount = FsInfoByteCount.FieldOffset_FILE_FS_ATTRIBUTE_INFORMATION_FileSystemName_Add_BytesToCopy;

                Requirement.Capture(@"[2.1.5.12.5 FileFsAttributeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: Status set to STATUS_BUFFER_OVERFLOW if BytesToCopy < OutputBuffer.FileSystemNameLength else STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }
                #endregion

                #region 3.1.5.12.6    FileFsControlInformation

            case (FileSystemInfoClass.File_FsControlInformation):
            {
                // If OutputBufferSize is smaller than BlockAlign( sizeof( FILE_FS_CONTROL_INFORMATION ), 8 )
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Helper.CaptureRequirement(2707, @"[In FileFsControlInformation] Pseudocode for the operation is as follows: 
                                If OutputBufferSize is smaller than BlockAlign( sizeof( FILE_FS_CONTROL_INFORMATION ), 8 ) the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                if (!gIsImplementQueryFileFsControlInformation)
                {
                    Helper.CaptureRequirement(7802, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:] 
                                If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_PARAMETER.");
                    return(MessageStatus.INVALID_PARAMETER);
                }

                if (!gisQuotasSupported)
                {
                    Helper.CaptureRequirement(7803, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:] 
                                If Open.File.Volume.IsQuotasSupported is FALSE, the operation MUST be failed with STATUS_VOLUME_NOT_UPGRADED");
                    return(MessageStatus.VOLUME_NOT_UPGRADED);
                }

                Helper.CaptureRequirement(2715, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:] 
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof(FILE_FS_CONTROL_INFORMATION).");
                byteCount = FsInfoByteCount.SizeOf_FILE_FS_CONTROL_INFORMATION;

                Helper.CaptureRequirement(2716, @"[In FileFsControlInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }

                #endregion

                #region 3.1.5.12.8    FileFsObjectIdInformation

            case (FileSystemInfoClass.File_FsObjectId_Information):
            {
                // If OutputBufferSize is less than the size of FILE_FS_OBJECTID_INFORMATION
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Helper.CaptureRequirement(2755, @"[In FileFsObjectIdInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is less than sizeof( FILE_FS_OBJECTID_INFORMATION ), 
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                if (!gIsImplementQueryFileFsObjectIdInformation)
                {
                    Helper.CaptureRequirement(4811, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:] 
                                If the object store does not implement this functionality, the operation MUST be failed with STATUS_INVALID_PARAMETER.");
                    return(MessageStatus.INVALID_PARAMETER);
                }

                if (!gisObjectIDsSupported)
                {
                    Helper.CaptureRequirement(4812, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:] 
                                If Open.File.Volume.IsObjectIDsSupported is FALSE, the operation MUST be failed with STATUS_VOLUME_NOT_UPGRADED.");
                    return(MessageStatus.VOLUME_NOT_UPGRADED);
                }

                Helper.CaptureRequirement(2761, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_FS_OBJECTID_INFORMATION ).");
                byteCount = FsInfoByteCount.SizeOf_FILE_FS_OBJECTID_INFORMATION;

                Helper.CaptureRequirement(2762, @"[In FileFsObjectIdInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }

                #endregion

                #region 2.1.5.12.10   FileFsSectorSizeInformation

            case (FileSystemInfoClass.File_FsSectorSizeInformation):
            {
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Requirement.Capture(@"[2.1.5.12.10 FileFsSectorSizeInformation], Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_FS_SECTOR_SIZE_INFORMATION), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Requirement.Capture(@"[2.1.5.12.10 FileFsSectorSizeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: ByteCount set to the size of the FILE_FS_SECTOR_SIZE_INFORMATION structure.");
                byteCount = FsInfoByteCount.SizeOf_FILE_FS_SECTOR_SIZE_INFORMATION;

                Requirement.Capture(@"[2.1.5.12.10 FileFsSectorSizeInformation], Pseudocode for the operation is as follows:
                            Upon successful completion of the operation, the object store MUST return: Status set to STATUS_SUCCESS.");
                return(MessageStatus.SUCCESS);
            }

                #endregion

                #region Information Class which is not defined in MS-FSCC
            case FileSystemInfoClass.Zero:
            {
                Requirement.Capture(@"[MS-FSCC 2.5 File System Information Classes] If an Information Class is specified that does not match the usage in the above table, STATUS_INVALID_INFO_CLASS MUST be returned.");
                return(MessageStatus.INVALID_INFO_CLASS);
            }

            case FileSystemInfoClass.NOT_DEFINED_IN_FSCC:
            {
                if (outBufSmall == OutputBufferSize.LessThan)
                {
                    Requirement.Capture(@"Negative test with artificial FileSystemInfoClass.NOT_DEFINED_IN_FSCC:
                                If OutputBufferSize is smaller than sizeof(NOT_DEFINED_IN_FSCC), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH");
                    return(MessageStatus.INFO_LENGTH_MISMATCH);
                }

                Requirement.Capture(@"[MS-SMB2 section 3.3.5.20.2 Handling SMB2_0_INFO_FILESYSTEM] If the store does not support the data requested, the server MUST fail the request with STATUS_NOT_SUPPORTED.");
                return(MessageStatus.NOT_SUPPORTED);
            }
                #endregion

            default:
                break;
            }

            Helper.CaptureRequirement(2630, @"[In Application Requests a Query of File System Information]On completion, the object store MUST return:
                [Status,OutputBuffer,ByteCount].");
            return(MessageStatus.SUCCESS);
        }
コード例 #4
0
 internal static MessageStatus WorkaroundQueryFileInfoPart1(FileSystem fileSystem, FileInfoClass fileInfoClass, OutputBufferSize outputBufferSize, ref ByteCount byteCount, ref OutputBuffer outputBuffer, MessageStatus returnedStatus, ITestSite site)
 {
     if (fileInfoClass == FileInfoClass.NOT_DEFINED_IN_FSCC || fileInfoClass == FileInfoClass.FILE_BOTH_DIR_INFORMATION ||
         fileInfoClass == FileInfoClass.FILE_DIRECTORY_INFORMATION || fileInfoClass == FileInfoClass.FILE_FULL_DIR_INFORMATION ||
         fileInfoClass == FileInfoClass.FILE_LINKS_INFORMATION || fileInfoClass == FileInfoClass.FILE_ID_BOTH_DIR_INFORMATION ||
         fileInfoClass == FileInfoClass.FILE_ID_FULL_DIR_INFORMATION || fileInfoClass == FileInfoClass.FILE_ID_GLOBAL_TX_DIR_INFORMATION ||
         fileInfoClass == FileInfoClass.FILE_NAME_INFORMATION || fileInfoClass == FileInfoClass.FILE_NAMES_INFORMATION ||
         fileInfoClass == FileInfoClass.FILE_OBJECTID_INFORMATION || fileInfoClass == FileInfoClass.FILE_QUOTA_INFORMATION ||
         fileInfoClass == FileInfoClass.FILE_REPARSE_POINT_INFORMATION || fileInfoClass == FileInfoClass.FILE_SFIO_RESERVE_INFORMATION ||
         fileInfoClass == FileInfoClass.FILE_STANDARD_LINK_INFORMATION)
     {
         returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(2749, MessageStatus.INVALID_INFO_CLASS, returnedStatus, site);
     }
     else if (fileInfoClass == FileInfoClass.FILE_ACCESS_INFORMATION && outputBufferSize == OutputBufferSize.NotLessThan)
     {
         outputBuffer = FsaUtility.TransferExpectedResult <OutputBuffer>(1421, new OutputBuffer(), outputBuffer, site);
     }
     else if (fileInfoClass == FileInfoClass.FILE_FULLEA_INFORMATION && outputBufferSize == OutputBufferSize.LessThan)
     {
         returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(3994, MessageStatus.BUFFER_TOO_SMALL, returnedStatus, site);
     }
     else if (fileInfoClass == FileInfoClass.FILE_FULLEA_INFORMATION &&
              returnedStatus == MessageStatus.NO_EAS_ON_FILE)
     {
         // For query FILE_FULLEA_INFORMATION, when server returns STATUS_NO_EAS_ON_FILE, this result is valid according to model design.
         // Transfer the return code and byteCount to make model test cases passed.
         byteCount      = FsaUtility.TransferExpectedResult <ByteCount>(3992, ByteCount.SizeofFILE_FULL_EA_INFORMATION, byteCount, site);
         returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(1187, MessageStatus.SUCCESS, returnedStatus, site);
     }
     else if (fileInfoClass == FileInfoClass.FILE_STREAM_INFORMATION &&
              fileSystem == FileSystem.FAT32)
     {
         returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(1421, MessageStatus.SUCCESS, returnedStatus, site);
     }
     else if (fileInfoClass == FileInfoClass.FILE_COMPRESSION_INFORMATION &&
              fileSystem == FileSystem.FAT32)
     {
         if (outputBufferSize == OutputBufferSize.NotLessThan)
         {
             returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(1421, MessageStatus.SUCCESS, returnedStatus, site);
             byteCount      = FsaUtility.TransferExpectedResult <ByteCount>(1421, ByteCount.SizeofFILE_COMPRESSION_INFORMATION, byteCount, site);
         }
         else if (outputBufferSize == OutputBufferSize.LessThan)
         {
             returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(1489, MessageStatus.INFO_LENGTH_MISMATCH, returnedStatus, site);
             byteCount      = FsaUtility.TransferExpectedResult <ByteCount>(1489, ByteCount.NotSet, byteCount, site);
         }
     }
     else if (fileInfoClass == FileInfoClass.FILE_ATTRIBUTETAG_INFORMATION &&
              fileSystem == FileSystem.FAT32)
     {
         if (outputBufferSize == OutputBufferSize.NotLessThan)
         {
             returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(1421, MessageStatus.SUCCESS, returnedStatus, site);
             byteCount      = FsaUtility.TransferExpectedResult <ByteCount>(1421, ByteCount.SizeofFILE_ATTRIBUTE_TAG_INFORMATION, byteCount, site);
         }
         else if (outputBufferSize == OutputBufferSize.LessThan)
         {
             returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(1445, MessageStatus.INFO_LENGTH_MISMATCH, returnedStatus, site);
             byteCount      = FsaUtility.TransferExpectedResult <ByteCount>(1445, ByteCount.NotSet, byteCount, site);
         }
     }
     else if (fileInfoClass == FileInfoClass.FILE_FULLEA_INFORMATION &&
              fileSystem != FileSystem.NTFS &&
              outputBufferSize == OutputBufferSize.NotLessThan)
     {
         // FILE_FULL_EA_INFORMATION is only supported in NTFS, will failed with STATUS_INVALID_DEVICE_REQUEST in other file systems.
         // Transfer the return code and byteCount to make model test cases passed.
         byteCount      = FsaUtility.TransferExpectedResult <ByteCount>(3992, ByteCount.SizeofFILE_FULL_EA_INFORMATION, byteCount, site);
         returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(1187, MessageStatus.SUCCESS, returnedStatus, site);
     }
     else if (fileInfoClass == FileInfoClass.FILE_ALTERNATENAME_INFORMATION &&
              fileSystem == FileSystem.REFS &&
              outputBufferSize == OutputBufferSize.NotLessThan)
     {
         // REFS file system does not support FILE_ALTERNATENAME_INFORMATION, will failed with STATUS_OBJECT_NAME_NOT_FOUND
         // Transfer the return code and byteCount to make model test cases passed.
         byteCount      = FsaUtility.TransferExpectedResult <ByteCount>(3992, ByteCount.FieldOffsetFILE_NAME_INFORMATION_FileNameAddOutputBuffer_FileNameLength, byteCount, site);
         returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(1187, MessageStatus.SUCCESS, returnedStatus, site);
     }
     return(returnedStatus);
 }
 internal static MessageStatus WorkAroundQueryFileSystemInfo(FileSystemInfoClass fileInfoClass, OutputBufferSize outBufSmall, MessageStatus returnedStatus, ref FsInfoByteCount byteCount, ITestSite site)
 {
     if (fileInfoClass == FileSystemInfoClass.File_FsDriverPath_Information && outBufSmall == OutputBufferSize.NotLessThan)
     {
         // According to MS-FSA, it is expected to get error code STATUS_NOT_SUPPORTED
         // In SMB2 server, it returns STATUS_NOT_SUPPORTED correctly.
         // But SMB1 server responses with STATUS_INVALID_PARAMETER.
         // To keep same model behavior, transfer the error code to STATUS_NOT_SUPPORTED.
         returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(2674, MessageStatus.NOT_SUPPORTED, returnedStatus, site);
     }
     else if (fileInfoClass == FileSystemInfoClass.NOT_DEFINED_IN_FSCC && outBufSmall == OutputBufferSize.NotLessThan)
     {
         // For undefined information class, it is expected to get error code STATUS_NOT_SUPPORTED
         // In SMB2 server, it returns STATUS_NOT_SUPPORTED correctly.
         // But SMB1 server responses with STATUS_SUCCESS, and with "WarningErrorInfo" structure in query info outBuffer.
         // To keep same model behavior, transfer the error code to STATUS_NOT_SUPPORTED.
         returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(2674, MessageStatus.NOT_SUPPORTED, returnedStatus, site);
     }
     else if (fileInfoClass == FileSystemInfoClass.File_FsObjectId_Information && returnedStatus == MessageStatus.OBJECT_NAME_NOT_FOUND)
     {
         returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(2674, MessageStatus.SUCCESS, returnedStatus, site);
         byteCount      = FsInfoByteCount.SizeOf_FILE_FS_OBJECTID_INFORMATION;
     }
     return(returnedStatus);
 }
        internal static MessageStatus WorkAroundQueryFileInfoPart1(FileSystem fileSystem, FileInfoClass fileInfoClass, OutputBufferSize outputBufferSize, ref ByteCount byteCount, ref OutputBuffer outputBuffer, MessageStatus returnedStatus, ITestSite site)
        {
            if (fileInfoClass == FileInfoClass.NOT_DEFINED_IN_FSCC)
            {
                returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(1426, MessageStatus.INVALID_INFO_CLASS, returnedStatus, site);
            }
            else
            {
                switch (fileInfoClass)
                {
                case FileInfoClass.FILE_STANDARD_LINK_INFORMATION:
                {
                    returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(2749, MessageStatus.INVALID_INFO_CLASS, returnedStatus, site);
                    break;
                }

                case FileInfoClass.FILE_LINKS_INFORMATION:
                {
                    returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(1593, MessageStatus.INVALID_INFO_CLASS, returnedStatus, site);
                    break;
                }

                case FileInfoClass.FILE_QUOTA_INFORMATION:
                {
                    returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(2524, MessageStatus.INVALID_INFO_CLASS, returnedStatus, site);
                    break;
                }

                case FileInfoClass.FILE_SFIO_RESERVE_INFORMATION:
                {
                    returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(2734, MessageStatus.INVALID_INFO_CLASS, returnedStatus, site);
                    break;
                }

                case FileInfoClass.FILE_OBJECTID_INFORMATION:
                {
                    returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(1585, MessageStatus.INVALID_INFO_CLASS, returnedStatus, site);
                    break;
                }

                case FileInfoClass.FILE_REPARSE_POINT_INFORMATION:
                {
                    returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(2558, MessageStatus.INVALID_INFO_CLASS, returnedStatus, site);
                    break;
                }

                case FileInfoClass.FILE_NAME_INFORMATION:
                {
                    returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(1591, MessageStatus.INVALID_INFO_CLASS, returnedStatus, site);
                    break;
                }

                case FileInfoClass.FILE_FULLEA_INFORMATION:
                {
                    // SMB server does not suport this operation, transfer return code to keep same model behavior
                    if (returnedStatus == MessageStatus.INVALID_INFO_CLASS)
                    {
                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(3899, MessageStatus.BUFFER_TOO_SMALL, returnedStatus, site);
                        }
                        else
                        {
                            byteCount      = FsaUtility.TransferExpectedResult <ByteCount>(3992, ByteCount.SizeofFILE_FULL_EA_INFORMATION, byteCount, site);
                            returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(3994, MessageStatus.SUCCESS, returnedStatus, site);
                        }
                    }
                    break;
                }

                case FileInfoClass.FILE_ALTERNATENAME_INFORMATION:
                {
                    if (fileSystem == FileSystem.REFS && outputBufferSize == OutputBufferSize.NotLessThan)
                    {
                        // REFS file system does not support FILE_ALTERNATENAME_INFORMATION, will failed with STATUS_OBJECT_NAME_NOT_FOUND
                        // Transfer the return code and byteCount to make model test cases passed.
                        byteCount      = FsaUtility.TransferExpectedResult <ByteCount>(3992, ByteCount.FieldOffsetFILE_NAME_INFORMATION_FileNameAddOutputBuffer_FileNameLength, byteCount, site);
                        returnedStatus = FsaUtility.TransferExpectedResult <MessageStatus>(1187, MessageStatus.SUCCESS, returnedStatus, site);
                    }
                    break;
                }

                default:
                    break;
                }
            }
            return(returnedStatus);
        }
コード例 #7
0
 internal static MessageStatus WorkAroundQueryFileSystemInfo(FileSystemInfoClass fileInfoClass, OutputBufferSize outBufSmall, MessageStatus returnedStatus, ref FsInfoByteCount byteCount, ITestSite site)
 {
     if (fileInfoClass == FileSystemInfoClass.File_FsObjectId_Information && returnedStatus == MessageStatus.OBJECT_NAME_NOT_FOUND)
     {
         returnedStatus = FsaUtility.TransferExpectedResult<MessageStatus>(2674, MessageStatus.SUCCESS, returnedStatus, site);
         byteCount = FsInfoByteCount.SizeOf_FILE_FS_OBJECTID_INFORMATION;
     }
     return returnedStatus;
 }
コード例 #8
0
 internal static MessageStatus WorkaroundQueryFileInfoPart1(FileSystem fileSystem, FileInfoClass fileInfoClass, OutputBufferSize outputBufferSize, ref ByteCount byteCount, ref OutputBuffer outputBuffer, MessageStatus returnedStatus, ITestSite site)
 {
     if (fileInfoClass == FileInfoClass.NOT_DEFINED_IN_FSCC || fileInfoClass == FileInfoClass.FILE_BOTH_DIR_INFORMATION
         || fileInfoClass == FileInfoClass.FILE_DIRECTORY_INFORMATION || fileInfoClass == FileInfoClass.FILE_FULL_DIR_INFORMATIO
         || fileInfoClass == FileInfoClass.FILE_LINKS_INFORMATION || fileInfoClass == FileInfoClass.FILE_ID_BOTH_DIR_INFORMATION
         || fileInfoClass == FileInfoClass.FILE_ID_FULL_DIR_INFORMATION || fileInfoClass == FileInfoClass.FILE_ID_GLOBAL_TX_DIR_INFORMATION
         || fileInfoClass == FileInfoClass.FILE_NAME_INFORMATION || fileInfoClass == FileInfoClass.FILE_NAMES_INFORMATION
         || fileInfoClass == FileInfoClass.FILE_OBJECTID_INFORMATION || fileInfoClass == FileInfoClass.FILE_QUOTA_INFORMATION
         || fileInfoClass == FileInfoClass.FILE_REPARSE_POINT_INFORMATION || fileInfoClass == FileInfoClass.FILE_SFIO_RESERVE_INFORMATION
         || fileInfoClass == FileInfoClass.FILE_STANDARD_LINK_INFORMATION)
     {
         returnedStatus = FsaUtility.TransferExpectedResult<MessageStatus>(2749, MessageStatus.INVALID_INFO_CLASS, returnedStatus, site);
     }
     else if (fileInfoClass == FileInfoClass.FILE_ACCESS_INFORMATION && outputBufferSize == OutputBufferSize.NotLessThan)
     {
         outputBuffer = FsaUtility.TransferExpectedResult<OutputBuffer>(1421, new OutputBuffer(), outputBuffer, site);
     }
     else if (fileInfoClass == FileInfoClass.FILE_FULLEA_INFORMATION && outputBufferSize == OutputBufferSize.LessThan)
     {
         returnedStatus = FsaUtility.TransferExpectedResult<MessageStatus>(3994, MessageStatus.BUFFER_TOO_SMALL, returnedStatus, site);
     }
     else if (fileInfoClass == FileInfoClass.FILE_FULLEA_INFORMATION &&
         returnedStatus == MessageStatus.NO_EAS_ON_FILE)
     {
         // For query FILE_FULLEA_INFORMATION, when server returns STATUS_NO_EAS_ON_FILE, this result is valid according to model design.
         // Transfer the return code and byteCount to make model test cases passed.
         byteCount = FsaUtility.TransferExpectedResult<ByteCount>(3992, ByteCount.SizeofFILE_FULL_EA_INFORMATION, byteCount, site);
         returnedStatus = FsaUtility.TransferExpectedResult<MessageStatus>(1187, MessageStatus.SUCCESS, returnedStatus, site);
     }
     else if (fileInfoClass == FileInfoClass.FILE_FULLEA_INFORMATION &&
         fileSystem == FileSystem.REFS &&
         outputBufferSize == OutputBufferSize.NotLessThan)
     {
         // REFS file system does not support FILE_FULLEA_INFORMATION, will failed with STATUS_INVALID_DEVICE_REQUEST
         // Transfer the return code and byteCount to make model test cases passed.
         byteCount = FsaUtility.TransferExpectedResult<ByteCount>(3992, ByteCount.SizeofFILE_FULL_EA_INFORMATION, byteCount, site);
         returnedStatus = FsaUtility.TransferExpectedResult<MessageStatus>(1187, MessageStatus.SUCCESS, returnedStatus, site);
     }
     else if (fileInfoClass == FileInfoClass.FILE_ALTERNATENAME_INFORMATION &&
         fileSystem == FileSystem.REFS &&
         outputBufferSize == OutputBufferSize.NotLessThan)
     {
         // REFS file system does not support FILE_ALTERNATENAME_INFORMATION, will failed with STATUS_OBJECT_NAME_NOT_FOUND
         // Transfer the return code and byteCount to make model test cases passed.
         byteCount = FsaUtility.TransferExpectedResult<ByteCount>(3992, ByteCount.FieldOffsetFILE_NAME_INFORMATION_FileNameAddOutputBuffer_FileNameLength, byteCount, site);
         returnedStatus = FsaUtility.TransferExpectedResult<MessageStatus>(1187, MessageStatus.SUCCESS, returnedStatus, site);
     }
     return returnedStatus;
 }
        public static MessageStatus QueryFileInfoPart1(
            FileInfoClass fileInfoClass,
            OutputBufferSize outputBufferSize,
            out ByteCount byteCount,
            out OutputBuffer outputBuffer
            )
        {
            byteCount = ByteCount.NotSet;
            outputBuffer = new OutputBuffer();
            if (fileInfoClass == FileInfoClass.NOT_DEFINED_IN_FSCC)
            {
                Helper.CaptureRequirement(1426, @"[In Server Requests a Query of File Information ]
                    If FileInformationClass is not defined in [MS-FSCC] section 2.4, the operation MUST be failed with STATUS_INVALID_INFO_CLASS.");
                return MessageStatus.INVALID_INFO_CLASS;
            }

            switch (fileInfoClass)
            {
                #region  3.1.5.11.1    FileAccessInformation

                case (FileInfoClass.FILE_ACCESS_INFORMATION):
                    {
                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(1428, @"[In FileAccessInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof( FILE_ACCESS_INFORMATION ),
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        outputBuffer.AccessFlags = gOpenGrantedAccess;
                        Helper.CaptureRequirement(1430, @"[In FileAccessInformation,Pseudocode for the operation is as follows:]
                            OutputBuffer MUST be filled out as follows:OutputBuffer.AccessFlags set to Open.GrantedAccess.");

                        byteCount = ByteCount.SizeofFILE_ACCESS_INFORMATION;
                        Helper.CaptureRequirement(3967, @"[In FileAccessInformation]Upon successful completion of the operation,
                            the object store MUST return: ByteCount set to sizeof( FILE_ACCESS_INFORMATION ).");
                        Helper.CaptureRequirement(3968, @"[In FileAccessInformation]Upon successful completion of the operation,
                            the object store MUST return:Status set to STATUS_SUCCESS.");
                        Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion,
                            the object store MUST return:[Status,OutputBuffer,ByteCount].");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region  3.1.5.11.2    FileAlignmentInformation

                case (FileInfoClass.FILE_ALIGNMENT_INFORMATION):
                    {
                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(1433, @"[In FileAlignmentInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof( FILE_ALIGNMENT_INFORMATION ),
                                the operation MUST be failed with Status STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }
                        byteCount = ByteCount.SizeofFILE_ALIGNMENT_INFORMATION;
                        Helper.CaptureRequirement(1435, @"[In FileAlignmentInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_ALIGNMENT INFORMATION ).");
                        Helper.CaptureRequirement(1436, @"[In FileAlignmentInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion,
                            the object store MUST return:[Status,OutputBuffer,ByteCount].");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region  3.1.5.11.3    FileAllInformation

                case (FileInfoClass.FILE_ALL_INFORMATION):
                    {
                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(3970, @"[In FileAllInformation] Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_ALL_INFORMATION.NameInformation.FileName ) + 2, 8 ),
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }
                        byteCount = ByteCount.FieldOffsetFILE_ALL_INFORMATION_NameInformationAddNameInformationLength;
                        Helper.CaptureRequirement(3980, @"[In FileAllInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:
                            ByteCount set to FieldOffset( FILE_ALL_INFORMATION.NameInformation ) + NameInformationLength.");
                        Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion,
                            the object store MUST return:[Status,OutputBuffer,ByteCount].");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region  3.1.5.11.4    FileAlternateNameInformation

                case (FileInfoClass.FILE_ALTERNATENAME_INFORMATION):
                    {

                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(1438, @"[In FileAlternateNameInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than BlockAlign( FieldOffset( FILE_NAME_INFORMATION.FileName ) + 2, 4 ),
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        byteCount = ByteCount.FieldOffsetFILE_NAME_INFORMATION_FileNameAddOutputBuffer_FileNameLength;
                        Helper.CaptureRequirement(1442, @"[In FileAlternateNameInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:
                            ByteCount set to FieldOffset( FILE_NAME_INFORMATION.FileName ) + OutputBuffer.FileNameLength.");
                        Helper.CaptureRequirement(1443, @"[In FileAlternateNameInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion,
                            the object store MUST return:[Status,OutputBuffer,ByteCount].");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region  3.1.5.11.5    FileAttributeTagInformation

                case (FileInfoClass.FILE_ATTRIBUTETAG_INFORMATION):
                    {

                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(1445, @"[In FileAttributeTagInformation,Pseudocode for the operation is as follows:]
                                If OutputBufferSize is smaller than sizeof( FILE_ATTRIBUTE_TAG_INFORMATION ), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        byteCount = ByteCount.SizeofFILE_ATTRIBUTE_TAG_INFORMATION;
                        Helper.CaptureRequirement(1464, @"[In FileAttributeTagInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof(FILE_ATTRIBUTE_TAG_INFORMATION ).");
                        Helper.CaptureRequirement(1465, @"[In FileAttributeTagInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion,
                            the object store MUST return:[Status,OutputBuffer,ByteCount].");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region  3.1.5.11.6    FileBasicInformation

                case (FileInfoClass.FILE_BASIC_INFORMATION):
                    {
                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(1467, @"[In FileBasicInformation]Pseudocode for the operation is as follows:If OutputBufferSize is smaller than BlockAlign( sizeof( FILE_BASIC_INFORMATION ), 8 ), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        byteCount = ByteCount.SizeofFILE_BASIC_INFORMATION;
                        Helper.CaptureRequirement(3982, @"[In FileBasicInformation]Upon successful completion of the operation,
                            the object store MUST return:ByteCount set to sizeof( FILE_BASIC_INFORMATION ).");
                        Helper.CaptureRequirement(3983, @"[In FileBasicInformation]Upon successful completion of the operation,
                            the object store MUST return:Status set to STATUS_SUCCESS.");
                        Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion,
                            the object store MUST return:[Status,OutputBuffer,ByteCount].");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region  3.1.5.11.7    FileBothDirectoryInformation

                case (FileInfoClass.FILE_BOTH_DIR_INFORMATION):
                    {
                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        // This operation is not supported and MUST be failed with STATUS_NOT_SUPPORTED.
                        Helper.CaptureRequirement(1605, @"[In FileBothDirectoryInformation, This operation]MUST be failed with STATUS_NOT_SUPPORTED.");
                        //return MessageStatus.NOT_SUPPORTED;
                        //this is a TD issue ,so change the return value to return MessageStatus.INVALID_INFO_CLASS;
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                #endregion

                #region  3.1.5.11.8    FileCompressionInformation

                case (FileInfoClass.FILE_COMPRESSION_INFORMATION):
                    {
                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(1489, @"[In FileCompressionInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof( FILE_COMPRESSION_INFORMATION ),
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }
                        byteCount = ByteCount.SizeofFILE_COMPRESSION_INFORMATION;
                        Helper.CaptureRequirement(3984, @"[In FileCompressionInformation]Upon successful completion of the operation,
                            the object store MUST return:ByteCount set to sizeof(FILE_COMPRESSION_INFORMATION ).");
                        Helper.CaptureRequirement(3985, @"[In FileCompressionInformation]Upon successful completion of the operation,
                            the object store MUST return:Status set to STATUS_SUCCESS.");
                        Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion,
                            the object store MUST return:[Status,OutputBuffer,ByteCount].");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region  3.1.5.11.9    FileDirectoryInformation

                case (FileInfoClass.FILE_DIRECTORY_INFORMATION):
                    {
                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        // This operation is not supported and MUST be failed with STATUS_NOT_SUPPORTED.
                        Helper.CaptureRequirement(1603, @"[In FileDirectoryInformation,This operation ]MUST be failed with STATUS_NOT_SUPPORTED.");
                        //return MessageStatus.NOT_SUPPORTED;
                        //this is a TD issue ,so change the return value to return MessageStatus.INVALID_INFO_CLASS;
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                #endregion

                #region  3.1.5.11.10    FileEaInformation

                case (FileInfoClass.FILE_EA_INFORMATION):
                    {
                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(3986, @"[In FileEaInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof( FILE_EA_INFORMATION ), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }
                        byteCount = ByteCount.SizeofFILE_EA_INFORMATION;
                        Helper.CaptureRequirement(3987, @"[In FileEaInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_EA_INFORMATION ).");
                        Helper.CaptureRequirement(3988, @"[In FileEaInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion,
                            the object store MUST return:[Status,OutputBuffer,ByteCount].");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region  3.1.5.11.11    FileFullDirectoryInformation

                case (FileInfoClass.FILE_FULL_DIR_INFORMATIO):
                    {
                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        // This operation is not supported and MUST be failed with STATUS_NOT_SUPPORTED.
                        Helper.CaptureRequirement(1601, @"[In FileFullDirectoryInformation,This operation ]MUST be failed with STATUS_NOT_SUPPORTED.");
                        //return MessageStatus.NOT_SUPPORTED;
                        //this is a TD issue ,so change the return value to return MessageStatus.INVALID_INFO_CLASS, acctually ,it return INVALID_INFO_CLASS
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                #endregion

                #region  3.1.5.11.12    FileFullEaInformation

                case (FileInfoClass.FILE_FULLEA_INFORMATION):
                    {
                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(3994, @"[In FileFullEaInformation,Pseudocode for the operation is as follows:]
                                Upon successful completion of the operation, the object store MUST return:Status set to:STATUS_BUFFER_TOO_SMALL
                                if OutputBufferSize is too small to hold Open.NextEaEntry.  No entries are returned.");
                            return MessageStatus.BUFFER_TOO_SMALL;
                        }
                        byteCount = ByteCount.SizeofFILE_FULL_EA_INFORMATION;
                        Helper.CaptureRequirement(3992, @"[In FileFullEaInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to the size, in bytes,
                            of all FILE_FULL_EA_INFORMATION entries returned.");
                        return MessageStatus.SUCCESS;

                    }

                #endregion

                #region 3.1.5.11.13    FileHardLinkInformation

                case (FileInfoClass.FILE_LINKS_INFORMATION):
                    {
                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        // This operation is not supported and MUST be failed with STATUS_NOT_SUPPORTED.
                        Helper.CaptureRequirement(1593, @"[In FileHardLinkInformation,This operation] MUST be failed with STATUS_NOT_SUPPORTED.");
                        //return MessageStatus.NOT_SUPPORTED;
                        //this is a TD issue ,so change the return value to return MessageStatus.INVALID_INFO_CLASS;
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                #endregion

                #region 3.1.5.11.14  FileIdBothDirectoryInformation

                case (FileInfoClass.FILE_ID_BOTH_DIR_INFORMATION):
                    {
                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        // This operation is not supported and MUST be failed with STATUS_NOT_SUPPORTED.
                        Helper.CaptureRequirement(1595, @"[In FileIdBothDirectoryInformation,This operation] MUST be failed with STATUS_NOT_SUPPORTED.");
                        //return MessageStatus.NOT_SUPPORTED;
                        //this is a TD issue ,so change the return value to return MessageStatus.INVALID_INFO_CLASS;
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                #endregion

                #region 3.1.5.11.15  FileIdFullDirectoryInformation

                case (FileInfoClass.FILE_ID_FULL_DIR_INFORMATION):
                    {
                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        // This operation is not supported and MUST be failed with STATUS_NOT_SUPPORTED.
                        Helper.CaptureRequirement(1597, @"[In FileIdFullDirectoryInformation,This operation]MUST be failed with STATUS_NOT_SUPPORTED.");
                        //return MessageStatus.NOT_SUPPORTED;
                        //this is a TD issue ,so change the return value to return MessageStatus.INVALID_INFO_CLASS;
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                #endregion

                #region 3.1.5.11.16  FileIdGlobalTxDirectoryInformation

                case (FileInfoClass.FILE_ID_GLOBAL_TX_DIR_INFORMATION):
                    {
                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        // This operation is not supported and MUST be failed with STATUS_NOT_SUPPORTED.
                        Helper.CaptureRequirement(1599, @"[In FileIdGlobalTxDirectoryInformation,This operation] MUST be failed with STATUS_NOT_SUPPORTED.");
                        //return MessageStatus.NOT_SUPPORTED;
                        //this is a TD issue ,so change the return value to return MessageStatus.INVALID_INFO_CLASS;
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                #endregion

                #region 3.1.5.11.17    FileInternalInformation

                case (FileInfoClass.FILE_INTERNAL_INFORMATION):
                    {
                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(1524, @"[In FileInternalInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof( FILE_INTERNAL_INFORMATION ),
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }
                        byteCount = ByteCount.SizeofFILE_INTERNAL_INFORMATION;
                        Helper.CaptureRequirement(3997, @"[In FileInternalInformation]Upon successful completion of the operation,
                            the object store MUST return: ByteCount set to sizeof( FILE_INTERNAL_INFORMATION ).");
                        Helper.CaptureRequirement(3998, @"[In FileInternalInformation]Upon successful completion of the operation,
                            the object store MUST return:Status set to STATUS_SUCCESS.");
                        Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion,
                            the object store MUST return:[Status,OutputBuffer,ByteCount].");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 3.1.5.11.18    FileModeInformation

                case (FileInfoClass.FILE_MODE_INFORMATION):
                    {
                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(1529, @"[In FileModeInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof(FILE_MODE_INFORMATION ), the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }
                        byteCount = ByteCount.SizeofFILE_MODE_INFORMATION;
                        Helper.CaptureRequirement(4000, @"[In FileModeInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_MODE_INFORMATION ).");
                        Helper.CaptureRequirement(4001, @"[In FileModeInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion,
                            the object store MUST return:[Status,OutputBuffer,ByteCount].");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 3.1.5.11.19  FileNameInformation

                case (FileInfoClass.FILE_NAME_INFORMATION):
                    {
                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        // This operation is not supported and MUST be failed with STATUS_NOT_SUPPORTED.
                        Helper.CaptureRequirement(1591, @"[In FileNameInformation]This operation MUST be failed with STATUS_NOT_SUPPORTED.");
                        //return MessageStatus.NOT_SUPPORTED;
                        //this is a TD issue ,so change the return value to return MessageStatus.INVALID_INFO_CLASS;
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                #endregion

                #region 3.1.5.11.20  FileNamesInformation

                case (FileInfoClass.FILE_NAMES_INFORMATION):
                    {
                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        // This operation is not supported and MUST be failed with STATUS_NOT_SUPPORTED.
                        Helper.CaptureRequirement(1587, @"[In FileNamesInformation]If used to query file information STATUS_NOT_SUPPORTED MUST be returned.");
                        //return MessageStatus.NOT_SUPPORTED;
                        //this is a TD issue ,so change the return value to return MessageStatus.INVALID_INFO_CLASS;
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                #endregion

                #region 3.1.5.11.21    FileNetworkOpenInformation

                case (FileInfoClass.FILE_NETWORKOPEN_INFORMATION):
                    {
                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(4002, @"[In FileNetworkOpenInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof( FILE_NETWORK_OPEN_INFORMATION ),
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }

                        byteCount = ByteCount.SizeofFILE_NETWORK_OPEN_INFORMATION;
                        Helper.CaptureRequirement(4004, @"[In FileNetworkOpenInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_NETWORK_OPEN_INFORMATION ).");
                        Helper.CaptureRequirement(4005, @"[In FileNetworkOpenInformation,Pseudocode for the operation is as follows:]U
                            pon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion,
                            the object store MUST return:[Status,OutputBuffer,ByteCount].");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 3.1.5.11.22  FileObjectIdInformation

                case (FileInfoClass.FILE_OBJECTID_INFORMATION):
                    {

                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        // This operation is not supported and MUST be failed with STATUS_NOT_SUPPORTED.
                        Helper.CaptureRequirement(1585, @"[In FileObjectIdInformation,This operation]MUST be failed with STATUS_NOT_SUPPORTED.");
                        //return MessageStatus.NOT_SUPPORTED;
                        //this is a TD issue ,so change the return value to return MessageStatus.INVALID_INFO_CLASS;
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                #endregion

                #region 3.1.5.11.23    FilePositionInformation

                case (FileInfoClass.FILE_POSITION_INFORMATION):
                    {
                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(1561, @"[In FilePositionInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is less than the size, in bytes, of the FILE_POSITION_INFORMATION structure,
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }
                        Helper.CaptureRequirement(1563, @"[In FilePositionInformation,Pseudocode for the operation is as follows:]
                            The operation returns STATUS_SUCCESS.<57>");
                        Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion,
                            the object store MUST return:[Status,OutputBuffer,ByteCount].");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 3.1.5.11.24  FileQuotaInformation

                case (FileInfoClass.FILE_QUOTA_INFORMATION):
                    {
                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        // This operation is not supported and MUST be failed with STATUS_NOT_SUPPORTED.
                        Helper.CaptureRequirement(2525, @"[In FileQuotaInformation]If used to query file information STATUS_NOT_SUPPORTED MUST be returned.");
                        Helper.CaptureRequirement(2524, @"[In FileQuotaInformation]This operation is not supported as a file information class,
                            it is only supported as a directory enumeration class, see section 3.1.5.5.2.");
                        //return MessageStatus.NOT_SUPPORTED;
                        //this is a TD issue ,so change the return value to return MessageStatus.INVALID_INFO_CLASS;
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                #endregion

                #region 3.1.5.11.25  FileReparsePointInformation

                case (FileInfoClass.FILE_REPARSE_POINT_INFORMATION):
                    {
                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        // This operation is not supported and MUST be failed with STATUS_NOT_SUPPORTED.
                        Helper.CaptureRequirement(2559, @"[In FileReparsePointInformation ]
                           If used to query file information STATUS_NOT_SUPPORTED MUST be returned.");
                        Helper.CaptureRequirement(2558, @"[In FileReparsePointInformation ] This operation is not supported as a file information class,
                            it is only supported as a directory enumeration class, see section 3.1.5.5.3.");
                        //return MessageStatus.NOT_SUPPORTED;
                        //this is a TD issue ,so change the return value to return MessageStatus.INVALID_INFO_CLASS;
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                #endregion

                #region 3.1.5.11.26  FileSfioReserveInformation

                case (FileInfoClass.FILE_SFIO_RESERVE_INFORMATION):
                    {
                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        // This operation is not supported and MUST be failed with STATUS_NOT_SUPPORTED.
                        Helper.CaptureRequirement(2734, @"[In FileSfioReserveInformation] This operation MUST be failed with STATUS_NOT_SUPPORTED.");
                        //return MessageStatus.NOT_SUPPORTED;
                        //this is a TD issue ,so change the return value to return MessageStatus.INVALID_INFO_CLASS;
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                #endregion

                #region 3.1.5.11.27    FileStandardInformation

                case (FileInfoClass.FILE_STANDARD_INFORMATION):
                    {
                        if (outputBufferSize == OutputBufferSize.LessThan)
                        {
                            Helper.CaptureRequirement(4006, @"[In FileStandardInformation]Pseudocode for the operation is as follows:
                                If OutputBufferSize is smaller than sizeof( FILE_STANDARD_INFORMATION ),
                                the operation MUST be failed with STATUS_INFO_LENGTH_MISMATCH.");
                            return MessageStatus.INFO_LENGTH_MISMATCH;
                        }
                        byteCount = ByteCount.SizeofFILE_STANDARD_INFORMATION;
                        Helper.CaptureRequirement(4007, @"[In FileStandardInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:ByteCount set to sizeof( FILE_STANDARD_INFORMATION ).");
                        Helper.CaptureRequirement(4008, @"[In FileStandardInformation,Pseudocode for the operation is as follows:]
                            Upon successful completion of the operation, the object store MUST return:Status set to STATUS_SUCCESS.");
                        Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion,
                            the object store MUST return:[Status,OutputBuffer,ByteCount].");
                        return MessageStatus.SUCCESS;
                    }

                #endregion

                #region 3.1.5.11.28  FileStandardLinkInformation

                case (FileInfoClass.FILE_STANDARD_LINK_INFORMATION):
                    {
                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        // This operation is not supported and MUST be failed with STATUS_NOT_SUPPORTED.
                        Helper.CaptureRequirement(2749, @"[In FileStandardLinkInformation]This operation MUST be failed with STATUS_NOT_SUPPORTED.");
                        //return MessageStatus.NOT_SUPPORTED;
                        //this is a TD issue ,so change the return value to return MessageStatus.INVALID_INFO_CLASS;
                        return MessageStatus.INVALID_INFO_CLASS;
                    }

                #endregion

                #region  3.1.5.11.29    FileStreamInformation
                case (FileInfoClass.FILE_STREAM_INFORMATION):
                    {
                        Condition.IsTrue(outputBufferSize == OutputBufferSize.NotLessThan);
                        Helper.CaptureRequirement(2625, @"[In FileStreamInformation,Pseudocode for the operation is as follows:]
                            The operation returns STATUS_SUCCESS.");
                        Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion,
                            the object store MUST return:[Status,OutputBuffer,ByteCount].");
                        return MessageStatus.SUCCESS;
                    }

                #endregion
            }
            Helper.CaptureRequirement(1421, @"[In Server Requests a Query of File Information ]On completion, the object store MUST return:[Status,OutputBuffer,ByteCount].");
            return MessageStatus.SUCCESS;
        }