public void MSCPSWS_S01_TC01_ClaimTypes_NullProviderNames()
        {
            // Call ClaimTypes method to get claim types with a null providerNames in the request.
            ArrayOfString responseOfClaimTypesResult = CPSWSAdapter.ClaimTypes(null);

            Site.Assert.IsNotNull(responseOfClaimTypesResult, "If the providerNames is NULL, the protocol server MUST use all the available claims providers.");
        }
        public void MSCPSWS_S01_TC03_ClaimTypes_ValidProviderName()
        {
            // Call the helper method to get all claims providers.
            SPProviderHierarchyTree[] responseOfGetHierarchyAllResult = TestSuiteBase.GetAllProviders();

            foreach (SPProviderHierarchyTree provider in responseOfGetHierarchyAllResult)
            {
                ArrayOfString providerNames = new ArrayOfString();
                providerNames.Add(provider.ProviderName);

                // Call ClaimTypes method to get claim types with valid providerNames in the request.
                ArrayOfString responseOfClaimTypesResult = CPSWSAdapter.ClaimTypes(providerNames);
                Site.Assert.IsNotNull(responseOfClaimTypesResult, "If the providerNames is a valid providerNames, the protocol server MUST use the current available claims providers.");

                // Call GetClaimTypesResultBySutAdapter method to get claim types with valid providerNames in the request.
                ArrayOfString getClaimTypesResultBySutAdapter = GetClaimTypesResultBySutAdapter(providerNames);
                Site.Assert.IsTrue(this.VerificationSutResultsAndProResults(responseOfClaimTypesResult, getClaimTypesResultBySutAdapter), "The claim types returned by the protocol and script should be equal.");
            }
        }
Exemplo n.º 3
0
        public void MSCPSWS_S01_TC02_ClaimTypes_AllValidProviderNames()
        {
            // Call the helper method to get all claims providers.
            SPProviderHierarchyTree[] responseOfGetHierarchyAllResult = TestSuiteBase.GetAllProviders();

            ArrayOfString providerNames = new ArrayOfString();

            foreach (SPProviderHierarchyTree provider in responseOfGetHierarchyAllResult)
            {
                providerNames.Add(provider.ProviderName);
            }

            // Call ClaimTypes method to get claim types with all of valid providerNames in the request.
            ArrayOfString responseOfClaimTypesResult = CPSWSAdapter.ClaimTypes(providerNames);

            Site.Assert.IsNotNull(responseOfClaimTypesResult, "If the providerNames is all of valid providerNames, the protocol server MUST use all the available claims providers.");

            bool isNotDuplicate = VierfyRemoveDuplicate(responseOfClaimTypesResult);

            Site.CaptureRequirementIfIsTrue(
                isNotDuplicate,
                146001,
                @"[In ClaimTypes] The protocol server will remove the duplicated claim types from the known basic claim types and the claim providers’ claim types.");

            // Call GetClaimTypesResultBySutAdapter method to get claim types with all of valid providerNames in the request.
            ArrayOfString getClaimTypesResultBySutAdapter = GetClaimTypesResultBySutAdapter(providerNames);

            Site.Assert.IsTrue(this.VerificationSutResultsAndProResults(responseOfClaimTypesResult, getClaimTypesResultBySutAdapter), "The claim types returned by the protocol and script should be equal.");

            // If the claims providers listed in the provider names in the input message is retrieved successfully, then the following requirement can be captured.
            Site.CaptureRequirement(
                144,
                @"[In ClaimTypes] The protocol server MUST retrieve all known basic claim types. In addition, the protocol server MUST retrieve claim types from claims providers that meet both of the following criteria:
The claims providers are associated with the Web application (1) specified in the input message.
The claim providers are listed in the provider names in the input message.");
        }