public override void Initialize()

in TestSuites/ADFamily/src/MS-FRS2/Adapter/FRS2ManagedAdapter.cs [509:1238]


        public override void Initialize(ITestSite testSite)
        {
            FRS2Helpers.Initialize(testSite);
            WindowsDFSRSControlAdapter.Site = testSite;
            bool adFlags = false;
            IConfigStoreInitializerAdapter initer = testSite.GetAdapter<IConfigStoreInitializerAdapter>();
            initer.UpdateConfigStore(testSite);
            FRSSite = TestClassBase.BaseTestSite;
            FRSSite.DefaultProtocolDocShortName = "MS-FRS2";
            iFrs2Adapter = FRSSite.GetAdapter<IFRS2ManagedAdapter>();
            serverControllerAdapter = FRSSite.GetAdapter<IFRS2ServerControllerAdapter>();
            interfaceUUIDdrsuapi = ConfigStore.SPNUuid;
            String replicationString = ConfigStore.ReplicaId1;
            if (!ConfigStore.IsTestSYSVOL)
                replicationSetId = serverControllerAdapter.InitializeGuid(replicationString,
                                                  "(objectClass=msDFSR-ReplicationGroup)");
            String Contentstring = ConfigStore.ContentId1;
            if (!ConfigStore.IsTestSYSVOL)
                contentsetId = serverControllerAdapter.InitializeGuid(Contentstring,
                                            "(objectClass=msDFSR-ContentSet)");

            //Server Name
            string serverName = ConfigStore.SutDnsName;
            string servicePrincipalName = null;
            string[] att = { "servicePrincipalName" };
            System.DirectoryServices.Protocols.SearchResponse respObj;
            serverControllerAdapter.RetrieveObjectwithattributes(
                                        ConfigStore.SutDN,
                                         ConfigStore.SutIp,
                                          "(objectClass=*)",
                                          att,
                                          System.DirectoryServices.Protocols.SearchScope.Base,
                                          out respObj);

            string[] servicePrincpalNames = new string[respObj.Entries[0].Attributes["servicePrincipalName"].Count];

            for (int count = 0; count < respObj.Entries[0].Attributes["servicePrincipalName"].Count; count++)
            {
                servicePrincpalNames[count] = (string)(respObj.Entries[0].Attributes["servicePrincipalName"][count]);
                if (servicePrincpalNames[count].ToLower().Contains(interfaceUUIDdrsuapi))
                {
                    servicePrincipalName = servicePrincpalNames[count];
                }
            }
            objectUUID = ConfigStore.FRS2RpcUuid;

            authLevels = (uint)RPC_C_AUTHN_LEVEL.RPC_C_AUTHN_LEVEL_PKT_PRIVACY;
            authService = Convert.ToUInt32(ConfigStore.AuthenticationSVC);
            bindingHandle = RPCBindingServer(ConfigStore.SutIp, servicePrincipalName, ConfigStore.TransportProtocol, objectUUID, authLevels, authService);


            if (!ConfigStore.IsTestSYSVOL)
            {
                #region Requirement Validation

                #region MS-FRS2_R254

                //Verifying In msDFSR-LocalSettings: Exactly one top-level DFS-R LocalSettings
                //object MUST exist for each computer that is configured for replication.
                //Verified by quering active directory DFSR_LocalSettings.
                adFlags = serverControllerAdapter.AdValidation(
                                       ConfigStore.Ms_DFSRLocalSettings,
                                        "(objectClass=msDFSR-LocalSettings)",
                                        "objectGUID");

                FRSSite.CaptureRequirementIfIsTrue(
                                                                    adFlags,
                                                                     254,
                                                                    "In msDFSR-LocalSettings: Exactly one top-level" +
                                                                    "DFS-R LocalSettings object MUST exist for each " +
                                                                    "computer that is configured for replication.");

                #endregion

                #region MS-FRS2_R259

                bool flag259 = serverControllerAdapter.SetACLs(ConfigStore.Ms_DFSRLocalSettings,
                                         ConfigStore.AdminName,
                                         ConfigStore.DomainNetbiosName,
                                         ActiveDirectoryRights.Delete,
                                         AccessControlType.Deny);


                if (ConfigStore.WillingToCheckReq[256])
                {   //In msDFSR-LocalSettings, ACLs may be set on this msDFSR-LocalSettings and inherited to children
                    FRSSite.CaptureRequirementIfIsTrue(flag259, 256, "In msDFSR-LocalSettings, ACLs may be set on this msDFSR-LocalSettings and inherited to children");
                }


                if (ConfigStore.IsWindows == true)
                {
                    //In the Windows implementation, ACLs are set on msDFSR-LocalSettings to protect changing or disclosing configuration information.<7>

                    FRSSite.CaptureRequirementIfIsTrue(flag259,
                                                    259,
                                                    @"In the Windows implementation, ACLs are set on msDFSR-LocalSettings 
                                                          to protect changing or disclosing configuration information.<7>");
                }
                #endregion

                bool flag317 = serverControllerAdapter.SetACLs(ConfigStore.Ms_DFSR_Content,
                                    ConfigStore.AdminName,
                                    ConfigStore.DomainNetbiosName,
                                    ActiveDirectoryRights.Delete,
                                    AccessControlType.Deny);

                if (ConfigStore.WillingToCheckReq[317])
                {
                    //Verifying whether ACLs are set on msDFSR-Content and inherited on child objects.
                    FRSSite.CaptureRequirementIfIsTrue(flag317,
                                                     317,
                                                    "ACLs MAY be set on msDFSR-Content and inherited on child objects.");
                }

                if (ConfigStore.IsWindows == true)
                {
                    //Verifying Windows doesnot set ACLs on msDFSR-Content and inherited on child Objects.
                    FRSSite.CaptureRequirementIfIsTrue(flag317, 318, "Windows doesnot set ACLs on msDFSR-Content and inherited on child Objects.");


                }


                #region MS-FRS2_R262
                //Verifying In msDFSR-Subscriber, the  msDFSR-MemberReference MUST exist.
                //Verified by quering ActiveDirectory for msDFSR-MemberReference in msDFSR-subscriber
                adFlags = serverControllerAdapter.AdValidation(
                                      ConfigStore.Ms_DFSRSubscriber,
                                       "(objectClass=msDFSR-Subscriber)",
                                        "msDFSR-MemberReference");
                FRSSite.CaptureRequirementIfIsTrue(
                                               adFlags,
                                               262,
                                               "In msDFSR-Subscriber, the  msDFSR-MemberReference" +
                                               "MUST exist.");

                #endregion

                #region MS-FRS2_R264
                //Verifying In msDFSR-Subscriber: At most, one msDFSR-Member object MUST be referenced 
                //from an msDFSR-Subscriber object.
                //Verifeid by quering for msDFSR-Member in msDFSR-subscriber object.
                adFlags = serverControllerAdapter.AdValidation(
                                    ConfigStore.Ms_DFSRSubscriber,
                                         "(objectClass=msDFSR-Subscriber)",
                                         "msDFSR-MemberReference");
                FRSSite.CaptureRequirementIfIsTrue(adFlags,
                                               264,
                                               "In msDFSR-Subscriber: At most, one msDFSR-Member object MUST" +
                                               "be referenced from an msDFSR-Subscriber object.");

                #endregion

                #region MS-FRS2_R268
                //Verifying In msDFSR-Subscription, the msDFSR-ContentSetGUID MUST exist.
                //Verfied by quering ActiveDirectory for msDFSR_ContentSet Guid in msDFSR-Subscription.
                adFlags = serverControllerAdapter.AdValidation(
                                      ConfigStore.Ms_DFSR_Subscription,
                                        "(objectClass=msDFSR-Subscription)",
                                        "msDFSR-ContentSetGUID");
                FRSSite.CaptureRequirementIfIsTrue(adFlags,
                                               268,
                                               "In msDFSR-Subscription, the " +
                                               "msDFSR-ContentSetGUID MUST exist");

                #endregion

                #region MS-FRS2_R270
                //Verifying In msDFSR-Subscription, the msDFSR-RootPath MUST exist.
                //Verified by quering ActiveDirecotry for msDFSR-RootPath in msDFSR-Subscription object.
                adFlags = serverControllerAdapter.AdValidation(
                                        ConfigStore.Ms_DFSR_Subscription,
                                         "(objectClass=msDFSR-Subscription)",
                                          "msDFSR-RootPath");
                FRSSite.CaptureRequirementIfIsTrue(adFlags,
                                               270,
                                               "In msDFSR-Subscription, the msDFSR-RootPath MUST exist.");

                #endregion

                adFlags = serverControllerAdapter.AdValidation(
                                        ConfigStore.Ms_DFSR_Subscription,
                                        "(objectClass=msDFSR-Subscription)",
                                        "msDFSR-Options",
                                        0);

                if (ConfigStore.Should)
                {
                    #region MS-FRS2_R280
                    //Verifying In msDFSR-Subscription for msDFSR-Options all other
                    //bits except,0X1 are ignored and SHOULD be set to 0.

                    FRSSite.CaptureRequirementIfIsTrue(
                                                       adFlags,
                                                       280,
                                                       "In msDFSR-Subscription for msDFSR-Options all " +
                                                       "other bits except,0X1 are ignored" +
                                                       "and SHOULD be set to 0.");

                    #endregion
                }

                #region MS-FRS2_R281
                if (ConfigStore.IsWindows == true)
                {
                    //Verifying In msDFSR-Options, Windows does ignore  all other bits except, 0X1 and set them to 0.
                    FRSSite.CaptureRequirementIfIsTrue(
                                                    adFlags,
                                                    281,
                                                    @"In msDFSR-Options, Windows does ignore  all other 
                                                           bits except, 0X1 and set them to 0.");
                }
                #endregion

                #region MS-FRS2_R289
                //Verifying  At most, one msDFSR-Content object MUST be referenced from an
                //msDFSR-Subscription object.
                //Verified by quering ActiveDirectory for msDFSR-content object
                //in msDFSR-Subscripton Object.
                adFlags = serverControllerAdapter.AdValidation(
                                       ConfigStore.Ms_DFSR_Subscription,
                                       "(objectClass=msDFSR-Subscription)",
                                       "msDFSR-ContentSetGuid");

                FRSSite.CaptureRequirementIfIsTrue(adFlags,
                                               289,
                                               " At most, one msDFSR-Content object MUST be " +
                                               "referenced from an msDFSR-Subscription object.");

                #endregion

                #region MS-FRS2_R288
                //Verifying Each msDFSR-Subscription object MUST contain a reference to one msDFSR-Content object.
                //Verifyied by quering the AD for msDFSR-Content object in msDFSR-Subscription.
                FRSSite.CaptureRequirementIfIsTrue(adFlags,
                                                288,
                                                @"Each msDFSR-Subscription object MUST contain a reference to 
                                                         one msDFSR-Content object.");
                #endregion

                #region MS-FRS2_R292
                //Verifying ACLs MAY be set on msDFSR-GlobalSettings and inherited on child objects.
                //Verified by setting Delete rights to ms-DFSR-GlobalSettings object, if it succeeds hence the requirement is verified.

                bool flag292 = serverControllerAdapter.SetACLs(ConfigStore.Ms_DFSR_GlobalSettings,
                                     ConfigStore.AdminName,
                                     ConfigStore.DomainNetbiosName,
                                     ActiveDirectoryRights.Delete,
                                     AccessControlType.Deny);

                if (ConfigStore.WillingToCheckReq[292])
                {
                    FRSSite.CaptureRequirementIfIsTrue(flag292,
                                                     292,
                                                     " ACLs MAY be set on msDFSR-GlobalSettings and inherited on child objects.");
                }

                if (ConfigStore.IsWindows == true)
                {
                    //Verifying Windows does not set ACLs on msDFSR-GlobalSettings and inherited on child objects.
                    FRSSite.CaptureRequirementIfIsTrue(flag292,
                                                     293,
                                                     "Windows does not set ACLs on msDFSR-GlobalSettings and inherited on child objects");

                }
                #endregion

                #region MS-FRS2_R294
                //Verifying There MUST be exactly one msDFSR-GlobalSettings object for every domain where
                // DFS-R is configured for replication.
                adFlags = serverControllerAdapter.AdValidation(
                                       ConfigStore.Ms_DFSR_GlobalSettings,
                                       "(objectClass=msDFSR-GlobalSettings)",
                                       "objectGUID");

                FRSSite.CaptureRequirementIfIsTrue(adFlags,
                                               294,
                                               "There MUST be exactly one msDFSR-GlobalSettings object" +
                                               "for every domain where DFS-R is configured for replication.");
                #endregion

                #region MS-FRS2_R298
                //Verifying The msDFSR-ReplicationGroupType field in
                //msDFSR-ReplicationGroup MUST exist.
                //Verified by Quering msDFSR-ReplicationGrouptype field in 
                //msDFSR-ReplicationGroup.
                adFlags = serverControllerAdapter.AdValidation(
                                     ConfigStore.ReplicaId1,
                                     "(objectClass=msDFSR-ReplicationGroup)",
                                     "msDFSR-ReplicationGroupType");

                FRSSite.CaptureRequirementIfIsTrue(
                                               adFlags,
                                               298,
                                               "The msDFSR-ReplicationGroupType field in " +
                                               "msDFSR-ReplicationGroup MUST exist.");

                #endregion

                #region MS-FRS2_R303
                //Verifying The objectGUID field in msDFSR-ReplicationGroup MUST exist.
                //Verified by Quering objectGUID  field in msDFSR-ReplicationGroup.
                adFlags = serverControllerAdapter.AdValidation(
                                           ConfigStore.ReplicaId1,
                                            "(objectClass=msDFSR-ReplicationGroup)",
                                            "objectGUID");

                FRSSite.CaptureRequirementIfIsTrue(adFlags,
                                               303,
                                               "The objectGUID field in msDFSR-ReplicationGroup MUST" +
                                               "exist.");

                #endregion

                adFlags = serverControllerAdapter.AdValidation(
                                         ConfigStore.ReplicaId1,
                                          "(objectClass=msDFSR-ReplicationGroup)",
                                          "msDFSR-Options",
                                           1);


                if (ConfigStore.Should)
                {
                    #region MS-FRS2_R307
                    //Verifying In msDFSR-Options field all other bits except 0X1,
                    //are ignored and SHOULD be set to 0.
                    //Verified by quering msDFSR-Options field in msDFSR-ReplicationGroup object.


                    FRSSite.CaptureRequirementIfIsTrue(
                                                   adFlags,
                                                   307,
                                                   "In msDFSR-Options field all other bits except 0X1," +
                                                   "are ignored and SHOULD be set to 0.");

                    #endregion
                }

                #region MS-FRS2_R308
                //Verifying In msDFSR-Options field, Windows ignore all other bits except 0X1,
                //and does set to them to 0.
                //Verified by Quering the AD for msDFSR-Options in msDFSR-Replication.
                if (ConfigStore.IsWindows)
                {
                    if (ConfigStore.IsTestSYSVOL)
                    {
                        FRSSite.CaptureRequirementIfIsFalse(
                                                        adFlags,
                                                        308,
                                                        @"In msDFSR-Options field, Windows ignore all other bits 
                                                            except 0X1, and does set to them to 0.");
                    }
                    else
                    {
                        FRSSite.CaptureRequirementIfIsTrue(
                                                                adFlags,
                                                                308,
                                                                @"In msDFSR-Options field, Windows ignore all other bits 
                                                                        except 0X1, and does set to them to 0.");
                    }
                }
                #endregion

                #region MS-FRS2_R311
                //Verifying Each msDFSR-ReplicationGroup MUST appear as a 
                //reference under msDFSR-GlobalSettings. 
                //Verfied by quering for objectGuid of an msDFSR_ReplicationGroup which is under msDFSR-GlobalSettings.
                adFlags = serverControllerAdapter.AdValidation(
                                         ConfigStore.ReplicaId1,
                                          "(objectClass=msDFSR-ReplicationGroup)",
                                           "ObjectGUID");
                FRSSite.CaptureRequirementIfIsTrue(
                                               adFlags,
                                               311,
                                               "Each msDFSR-ReplicationGroup MUST appear as a reference " +
                                               "under msDFSR-GlobalSettings. ");

                #endregion

                #region MS-FRS2_R312
                //Verifiyng The msDFSR-ReplicationGroup MUST contain an msDFSR-Content and an msDFSR-Topology reference. 
                //Verified by quering GUIDs of  Content and Topolgy  objects of the ReplicationGroup.
                adFlags = serverControllerAdapter.AdValidation(
                                       ConfigStore.Ms_DFSR_Content,
                                       "(objectClass=msDFSR-Content)",
                                       "ObjectGUID");
                if (adFlags)
                {
                    adFlags = serverControllerAdapter.AdValidation(
                                            ConfigStore.Ms_DFSR_Topology,
                                            "(objectClass=msDFSR-Topology)",
                                            "ObjectGUID");

                    FRSSite.CaptureRequirementIfIsTrue(
                                                       adFlags,
                                                       312,
                                                       "The msDFSR-ReplicationGroup MUST contain an msDFSR-Content" +
                                                       "and an msDFSR-Topology reference. ");

                }
                #endregion

                #region MS-FRS2_R313

                //Verifiying The msDFSR-ReplicationGroup MUST be at most one 
                //msDFSR-Content and at most one msDFSR-Topology child object 
                //under each msDFSR-ReplicationGroup object.
                //Verified by quering Content and Topology obects GUIDs of the
                //ReplicationGroup.

                adFlags = serverControllerAdapter.AdValidation(
                                       ConfigStore.Ms_DFSR_Content,
                                        "(objectClass=msDFSR-Content)",
                                        "ObjectGUID");
                if (adFlags)
                {
                    adFlags = serverControllerAdapter.AdValidation(
                                           ConfigStore.Ms_DFSR_Topology,
                                           "(objectClass=msDFSR-Topology)",
                                           "ObjectGUID");

                    FRSSite.CaptureRequirementIfIsTrue(
                                                        adFlags,
                                                        313,
                                                        "The msDFSR-ReplicationGroup MUST be at most one msDFSR-Content" +
                                                        "and at most one msDFSR-Topology child object under each" +
                                                        "msDFSR-ReplicationGroup object.");

                }
                #endregion

                adFlags = serverControllerAdapter.AdValidation(
                                   ConfigStore.Ms_DFSR_Content,
                                   "(objectClass=msDFSR-Content)",
                                   "ObjectGUID");
                if (ConfigStore.WillingToCheckReq[315])
                {
                    #region MS-FRS2_R315
                    //Verifiying Each msDFSR-Content MAY contain references to one or more msDFSR-ContentSet objects. 
                    //Verified by quering ActiveDirectory for ObjectGuid of ms-DFSR-content.

                    FRSSite.CaptureRequirementIfIsTrue(
                                                       adFlags,
                                                       315,
                                                       "Each msDFSR-Content MAY contain references " +
                                                       "to one or more msDFSR-ContentSet objects. ");

                    #endregion

                }

                #region MS-FRS2_R316
                //Verifying In the Windows implementation, each msDFSR-Content does not contain references
                //to one or more msDFSR-ContentSet objects. 
                if (ConfigStore.IsWindows)
                {
                    FRSSite.CaptureRequirementIfIsTrue(
                                                     adFlags,
                                                     316,
                                                     "Verifying In the Windows implementation, each msDFSR-Content" +
                                                     "does not contain references to one or more msDFSR-ContentSet objects. ");
                }
                #endregion
                #region MS-FRS2_R322
                //Verifying The objectGUID attribute of the msDFSR-ContentSet object MUST exist.
                //Verified by quering objectGuid of the msDFSR-contentSet object.
                adFlags = serverControllerAdapter.AdValidation(
                                         ConfigStore.Ms_DFSR_Content,
                                         "(objectClass=msDFSR-Content)",
                                         "objectGuid");

                FRSSite.CaptureRequirementIfIsTrue(adFlags,
                                                322,
                                                "The objectGUID attribute of the " +
                                               "msDFSR-ContentSet object MUST exist.");

                #endregion

                adFlags = serverControllerAdapter.AdValidation(
                                      ConfigStore.Ms_DFSR_Member,
                                      "(objectClass=msDFSR-Member)",
                                      "ObjectGUID");

                if (ConfigStore.WillingToCheckReq[335])
                {
                    #region MS-FRS2_R335
                    //Verifying Each msDFSR-Topology MAY contain references to one or more msDFSR-Member objects.


                    FRSSite.CaptureRequirementIfIsTrue(
                                                      adFlags,
                                                      335,
                                                      "Each msDFSR-Topology MAY contain references" +
                                                      "to one or more msDFSR-Member objects.");

                    #endregion
                }
                //Verifying In Windows implementation each msDFSR-Topology does not contain references to one or more msDFSR-Member objects.
                if (ConfigStore.IsWindows)
                {
                    FRSSite.CaptureRequirementIfIsTrue(adFlags,
                                                     336,
                                                     "In Windows implementation each msDFSR-Topology" +
                                                     "does not contain references to one or more msDFSR-Member objects.");
                }


                #region MS-FRS2_R338
                //Verifying Each computer that participates
                //in a replication group MUST have one corresponding member object.
                //Verified by Quering ObjectGuid of the msDFSR-Memeber 

                adFlags = serverControllerAdapter.AdValidation(
                                       ConfigStore.Ms_DFSR_Member,
                                        "(objectClass=msDFSR-Member)",
                                        "ObjectGUID");

                FRSSite.CaptureRequirementIfIsTrue(
                                               adFlags,
                                               338,
                                               "Each computer that participates in a replication group" +
                                               "MUST have one corresponding member object.");

                #endregion

                #region MS-FRS2_R340
                //Verifying The objectGUID attribute of the msDFSR-Member MUST exist.
                //Verified by Quering objectGUID attribute of the msDFSR-Member object.
                adFlags = serverControllerAdapter.AdValidation(
                                       ConfigStore.Ms_DFSR_Member,
                                       "(objectClass=msDFSR-Member)",
                                       "ObjectGUID");
                FRSSite.CaptureRequirementIfIsTrue(
                                                adFlags,
                                                340,
                                               "The objectGUID attribute of the msDFSR-Member MUST exist.");

                #endregion

                #region MS-FRS2_R342
                //Verifying The msDFSR-ComputerReference attribute of the msDFSR-Member MUST exist.
                //Verified by Quering ActiveDirectory  msDFSR-computerReference of the msDFSR-Member object.
                adFlags = serverControllerAdapter.AdValidation(
                                        ConfigStore.Ms_DFSR_Member,
                                        "(objectClass=msDFSR-Member)",
                                        "msDFSR-ComputerReference");

                FRSSite.CaptureRequirementIfIsTrue(
                                               adFlags,
                                               342,
                                               "The msDFSR-ComputerReference attribute of the msDFSR-Member MUST exist.");

                #endregion

                adFlags = serverControllerAdapter.AdValidation(
                                           ConfigStore.Ms_DFSR_Connection,
                                           "(objectClass=msDFSR-Connection)",
                                           "objectGuid");


                if (Convert.ToBoolean(ConfigStore.MAY_MS_FRS2_R346) == true)
                {
                    #region MS-FRS2_R346
                    //Verifying An msDFSR-Member object MAY contain more than one msDFSR-Connection object with the same partner.


                    FRSSite.CaptureRequirementIfIsTrue(
                                                        adFlags,
                                                        346,
                                                        "An msDFSR-Member object MAY contain more than one " +
                                                        "msDFSR-Connection object" +
                                                        "with the same partner.");


                    #endregion
                }
                #region MS-FRS2_R352
                //Verifying The objectGUID attribute of the msDFSR-Connection object MUST exist.
                //Verified by quering AD for ObjectGUID of the msDFSR-connection Object.
                adFlags = serverControllerAdapter.AdValidation(
                                       ConfigStore.Ms_DFSR_Connection,
                                       "(objectClass=msDFSR-Connection)",
                                       "ObjectGUID");
                if (!ConfigStore.IsTestSYSVOL)
                {
                    FRSSite.CaptureRequirementIfIsTrue(
                                                   adFlags,
                                                   352,
                                                   "The objectGUID attribute of the msDFSR-Connection object MUST exist.");

                }
                #endregion

                #region MS-FRS2_R354

                //Verifying the FromServer attribute of the msDFSR-Connection MUST exist.
                //Verified by Quering AD for the FromServer attribute of the msDFSR_Connection object.
                adFlags = serverControllerAdapter.AdValidation(
                                       ConfigStore.Ms_DFSR_Connection,
                                        "(objectClass=msDFSR-Connection)",
                                         "FromServer");

                if (!ConfigStore.IsTestSYSVOL)
                {
                    FRSSite.CaptureRequirementIfIsTrue(
                                                   adFlags,
                                                   354,
                                                   "The FromServer attribute of the msDFSR-Connection MUST exist.");
                }

                #endregion

                if (Convert.ToBoolean(ConfigStore.Should))
                {
                    #region MS-FRS2_R364
                    //Verifying the msDFSR-Options attribute of the msDFSR-Connection, bits[except 0x1]  SHOULD be set to 0.
                    //Verified by AD for msDFSR-option attribute of msDFSR-Connection object. if options  field is one
                    //hence the requirement is verified.
                    adFlags = serverControllerAdapter.AdValidation(
                                           ConfigStore.Ms_DFSR_Connection,
                                           "(objectClass=msDFSR-Connection)",
                                           "FromServer",
                                           1);

                    if (!ConfigStore.IsTestSYSVOL)
                    {
                        FRSSite.CaptureRequirementIfIsTrue(
                                                           adFlags,
                                                           364,
                                                           "The msDFSR-Options attribute of the msDFSR-Connection, bits[except 0x1]  SHOULD be set to 0.");
                    }
                    #endregion
                }
                #region MS-FRS2_R365
                //Verifying For the attribute  msDFSR-Options of the msDFSR-Connection,
                //Windows does ignore all other bits[except 0x1].
                if (ConfigStore.IsWindows)
                {
                    if (!ConfigStore.IsTestSYSVOL)
                    {
                        FRSSite.CaptureRequirementIfIsTrue(
                                                       adFlags,
                                                       365,
                                                       @"For the attribute  msDFSR-Options of the msDFSR-Connection, 
                                                                     Windows does ignore all other bits[except 0x1].");
                    }
                }



                #endregion

                #region MS-FRS2_R1268
                //Verifying msDFSR-ReadOnly flag must be set to 1 if the replicated folder is configured read-only .
                //Verfied by Quering the ActiveDirectory for msDFSR-Readonly object in msDFSR-Subscription.
                if (ConfigStore.Win2k8)
                {
                    adFlags = serverControllerAdapter.AdValidation(
                                     ConfigStore.Ms_DFSR_Subscription,
                                      "(objectClass=msDFSR-Subscription)",
                                      "msDFSR-ReadOnly",
                    true);
                }
                else
                {

                    adFlags = serverControllerAdapter.AdValidation(
                                            ConfigStore.Ms_DFSR_Subscription,
                                            "(objectClass=msDFSR-Subscription)",
                                            "msDFSR-ReadOnly",
                                          (ConfigStore.IsTestSYSVOL ? false : true));               
                }
                FRSSite.CaptureRequirementIfIsTrue(
                                                adFlags,
                                                1268,
                                                @"msDFSR-ReadOnly flag must be set to 1 if the replicated folder is configured read-only .");
                #endregion

                #region MS-FRS2_R1269
                //Verifying msDFSR-ReadOnly flag must be set to 0 for regular replicated folders. 
                adFlags = serverControllerAdapter.AdValidation(
                                        ConfigStore.Ms_DFSR_Subscription1,
                                        "(objectClass=msDFSR-Subscription)",
                                        "msDFSR-ReadOnly", false);

                FRSSite.CaptureRequirementIfIsTrue(
                                            adFlags,
                                            1269,
                                            @"msDFSR-ReadOnly flag must be set to 0 for regular replicated folders. ");
                #endregion

                #region MS-FRS2_R1272
                //Verifying whether The msDFSR-ReadOnly flag is optional and if not set, DFSR MUST default to treating the replicated folder as a read-write replicated folder. 
                FRSSite.CaptureRequirementIfIsTrue(
                                           adFlags,
                                           1272,
                                           @"The msDFSR-ReadOnly flag is optional and if not set, DFSR MUST default to treating the replicated folder as a read-write replicated folder. ");
                #endregion

                #region MS-FRS2_R1273
                if (ConfigStore.IsWindows)
                {
                    adFlags = serverControllerAdapter.AdValidation(
                                        ConfigStore.Ms_DFSR_Subscription,
                                        "(objectClass=msDFSR-Subscription)",
                                        "msDFSR-ReadOnly", (ConfigStore.IsTestSYSVOL ? false : true));               

                    //Verifying The msDFSR-ReadOnly flag is set to 1 on windows Server 2008 read
                    //only domain controllers which are using DFSR for SYSVOL replication <9> 
                    if (ConfigStore.Win2k8)
                    {
                        FRSSite.CaptureRequirementIfIsTrue(adFlags,
                                                            1273,
                                                            "The msDFSR-ReadOnly flag is set to 1 on windows Server 2008 read only domain controllers which are using DFSR for SYSVOL replication <9>");
                    }
                #endregion

                    if (ConfigStore.Win2K8R2)
                    {
                        //Verifying On Windows server 2008R2, msDFSR-ReadOnly flag is set to 1 to configure a replicated folder as readOnly<9> 
                        FRSSite.CaptureRequirementIfIsTrue(adFlags,
                                                          1274,
                                                          "On Windows server 2008R2, msDFSR-ReadOnly flag is set to 1 to configure a replicated folder as readOnly<9> ");

                    }
                }

                #endregion
            }
        }