Class com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectationTest

24

tests

0

failures

0

ignored

0.228s

duration

100%

successful

Tests

Test Duration Result
test_constructor_key 0.005s passed
test_constructor_key_checkType_value 0.002s passed
test_constructor_key_valueType 0.001s passed
test_constructor_key_valueType_value 0.001s passed
test_readJsonFromContent_emptyJson 0.002s passed
test_readJsonFromContent_jsonSpansMultipleLines 0.001s passed
test_readJsonFromContent_nonEmptyJson 0.008s passed
test_readJsonFromContent_nonEmptyJson_withinOtherContent 0.004s passed
test_readJsonFromContent_nullContent 0.014s passed
test_readJsonFromContent_string_includesPrefixText_extractedContentNotJson 0.019s passed
test_readJsonFromContent_string_includesPrefixText_extractedContentValidJson 0.005s passed
test_readJsonFromContent_string_nonEmptyContentString_missingRequiredText 0.001s passed
test_readJsonFromContent_unknownContentType 0.007s passed
test_readJsonFromContent_webResponse_emptyContentString 0.005s passed
test_readJsonFromContent_webResponse_includesPrefixText_extractedContentValidJson 0.002s passed
test_readJsonFromContent_webResponse_nullContentString 0.014s passed
test_validate_keyOnly 0.003s passed
test_validate_keyOnly_contentMissingKey 0.048s passed
test_validate_key_checkType_expectedValue 0.004s passed
test_validate_key_checkType_expectedValue_contentDoesNotPassValidation 0.023s passed
test_validate_key_valueType_contentMissingKey 0.015s passed
test_validate_key_valueType_expectedValue_valueIsNotCorrectType 0.015s passed
test_validate_key_valueType_valueDoesNotMatchExpectedValue 0.014s passed
test_validate_key_valueType_valueIsNotCorrectType 0.015s passed

Standard output

    TrConfigZapper.zapTrConfig : start invoke init()
init: Did BaseTraceService.captureSystemStreams() already get excuted? : false. Current COH is com.ibm.websphere.ras.CapturedOutputHolder@9d84be5d
registerLoggerHandlerSingleton: Did BaseTraceService.captureSystemStreams() already get excuted? : false. Current COH is com.ibm.websphere.ras.CapturedOutputHolder@9d84be5d
captureSystemStreams: CurrentCOH is : com.ibm.websphere.ras.CapturedOutputHolder@9d84be5d
    TrConfigZapper.zapTrConfig : finished invoke init()
SharedOutputManager captured the following: 
-- System.out -------------------------------------------------
-- System.err -------------------------------------------------
-- Messages -------------------------------------------------
-- Trace -------------------------------------------------

Standard error

Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.web.WebResponseUtils getResponseText
INFO: pageOrResponse is null
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{ Hello }]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{ "Hello":"Bob" }]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{"Hello":"Bob"}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{ "Hello":"Bob" }]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{"Hello":"Bob"}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"]}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"]}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"]}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"]}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.Expectation validate
INFO: Checking Expectation: [ Action: null | Search In: user-info-string | Check Type: KEY_EXISTS | Search Key: searchKey | Search for (string): null | Search for (object): null | Failure message: An error occurred validating the UserInfo string. ]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"]}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"]}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.Expectation validate
INFO: Checking Expectation: [ Action: null | Search In: user-info-string | Check Type: KEY_EXISTS | Search Key: searchKey | Search for (string): null | Search for (object): null | Failure message: An error occurred validating the UserInfo string. ]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"],"searchKey":"some value"}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"],"searchKey":"some value"}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.Expectation validate
INFO: Checking Expectation: [ Action: null | Search In: user-info-string | Check Type: DOES_NOT_CONTAIN | Search Key: searchKey | Search for (string): null | Search for (object): read | Failure message: An error occurred validating the UserInfo string. ]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"],"searchKey":"lines read lines"}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"],"searchKey":"lines read lines"}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.JsonObjectExpectation validateStringValue
INFO: Validating the value for the expected key as a string
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.validation.TestValidationUtils validateStringDoesNotContain
INFO: Test assertion is: false
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.validation.TestValidationUtils validateStringDoesNotContain
INFO: An error occurred validating the UserInfo string. Was not expecting to find [read] but received [lines read lines]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.Expectation validate
INFO: Checking Expectation: [ Action: null | Search In: user-info-string | Check Type: CONTAINS_REGEX | Search Key: searchKey | Search for (string): null | Search for (object): [0-9]+ | Failure message: An error occurred validating the UserInfo string. ]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"],"searchKey":"look! numbers! 123"}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"],"searchKey":"look! numbers! 123"}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.JsonObjectExpectation validateStringValue
INFO: Validating the value for the expected key as a string
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.validation.TestValidationUtils validateRegexFound
INFO: Test assertion is: true
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.Expectation validate
INFO: Checking Expectation: [ Action: null | Search In: user-info-string | Check Type: VALUE_TYPE | Search Key: searchKey | Search for (string): null | Search for (object): null | Failure message: An error occurred validating the UserInfo string. ]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"]}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"]}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.Expectation validate
INFO: Checking Expectation: [ Action: null | Search In: user-info-string | Check Type: VALUE_TYPE | Search Key: searchKey | Search for (string): null | Search for (object): null | Failure message: An error occurred validating the UserInfo string. ]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"],"searchKey":741776}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"],"searchKey":741776}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.JsonObjectExpectation validateValueType
INFO: Validating the ValueType of the value found for the expected key
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.Expectation validate
INFO: Checking Expectation: [ Action: null | Search In: user-info-string | Check Type: EQUALS | Search Key: searchKey | Search for (string): null | Search for (object): array | Failure message: An error occurred validating the UserInfo string. ]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"],"searchKey":"string"}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"],"searchKey":"string"}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.JsonObjectExpectation validateValueType
INFO: Validating the ValueType of the value found for the expected key
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.Expectation validate
INFO: Checking Expectation: [ Action: null | Search In: user-info-string | Check Type: EQUALS | Search Key: searchKey | Search for (string): null | Search for (object): array | Failure message: An error occurred validating the UserInfo string. ]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"],"searchKey":[]}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{"sub":"sub value","number":0.1123581321,"boolean":false,"null":null,"object":{"string":"stringVal","number":42},"array":["R","E","S","P","E","C","T"],"searchKey":[]}]
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.JsonObjectExpectation validateValueType
INFO: Validating the ValueType of the value found for the expected key
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.JsonObjectExpectation validateNonStringValue
INFO: Validating the value for the expected key as a non-string value
Apr 18, 2023 1:44:45 AM com.ibm.ws.security.fat.common.expectations.JsonObjectExpectation validateJsonNonPrimitiveType
INFO: Validating the value for the expected key as a non-JSON primitive value