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

24

tests

0

failures

0

ignored

0.335s

duration

100%

successful

Tests

Test Duration Result
test_constructor_key 0.008s 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.003s passed
test_readJsonFromContent_jsonSpansMultipleLines 0.001s passed
test_readJsonFromContent_nonEmptyJson 0.007s passed
test_readJsonFromContent_nonEmptyJson_withinOtherContent 0.005s passed
test_readJsonFromContent_nullContent 0.053s passed
test_readJsonFromContent_string_includesPrefixText_extractedContentNotJson 0.015s passed
test_readJsonFromContent_string_includesPrefixText_extractedContentValidJson 0.007s passed
test_readJsonFromContent_string_nonEmptyContentString_missingRequiredText 0s passed
test_readJsonFromContent_unknownContentType 0.008s passed
test_readJsonFromContent_webResponse_emptyContentString 0.006s passed
test_readJsonFromContent_webResponse_includesPrefixText_extractedContentValidJson 0.002s passed
test_readJsonFromContent_webResponse_nullContentString 0.016s passed
test_validate_keyOnly 0.003s passed
test_validate_keyOnly_contentMissingKey 0.060s passed
test_validate_key_checkType_expectedValue 0.003s passed
test_validate_key_checkType_expectedValue_contentDoesNotPassValidation 0.068s passed
test_validate_key_valueType_contentMissingKey 0.018s passed
test_validate_key_valueType_expectedValue_valueIsNotCorrectType 0.015s passed
test_validate_key_valueType_valueDoesNotMatchExpectedValue 0.014s passed
test_validate_key_valueType_valueIsNotCorrectType 0.019s passed

Standard output

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

Standard error

Jun 16, 2024 5:23:07 AM com.ibm.ws.security.fat.common.web.WebResponseUtils getResponseText
INFO: pageOrResponse is null
Jun 16, 2024 5:23:07 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{ Hello }]
Jun 16, 2024 5:23:07 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{ "Hello":"Bob" }]
Jun 16, 2024 5:23:07 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{"Hello":"Bob"}]
Jun 16, 2024 5:23:07 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{ "Hello":"Bob" }]
Jun 16, 2024 5:23:07 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{"Hello":"Bob"}]
Jun 16, 2024 5:23:07 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Extracted UserInfo string: [{}]
Jun 16, 2024 5:23:07 AM com.ibm.ws.security.fat.common.social.expectations.UserInfoJsonExpectation readJsonFromContent
INFO: Resulting JSON object: [{}]
Jun 16, 2024 5:23:07 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"]}]
Jun 16, 2024 5:23:07 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"]}]
Jun 16, 2024 5:23:07 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"]}]
Jun 16, 2024 5:23:07 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"]}]
Jun 16, 2024 5:23:07 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. ]
Jun 16, 2024 5:23:07 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"]}]
Jun 16, 2024 5:23:07 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"]}]
Jun 16, 2024 5:23:08 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. ]
Jun 16, 2024 5:23:08 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"}]
Jun 16, 2024 5:23:08 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"}]
Jun 16, 2024 5:23:08 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. ]
Jun 16, 2024 5:23:08 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"}]
Jun 16, 2024 5:23:08 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"}]
Jun 16, 2024 5:23:08 AM com.ibm.ws.security.fat.common.expectations.JsonObjectExpectation validateStringValue
INFO: Validating the value for the expected key as a string
Jun 16, 2024 5:23:08 AM com.ibm.ws.security.fat.common.validation.TestValidationUtils validateStringDoesNotContain
INFO: Test assertion is: false
Jun 16, 2024 5:23:08 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]
Jun 16, 2024 5:23:08 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. ]
Jun 16, 2024 5:23:08 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"}]
Jun 16, 2024 5:23:08 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"}]
Jun 16, 2024 5:23:08 AM com.ibm.ws.security.fat.common.expectations.JsonObjectExpectation validateStringValue
INFO: Validating the value for the expected key as a string
Jun 16, 2024 5:23:08 AM com.ibm.ws.security.fat.common.validation.TestValidationUtils validateRegexFound
INFO: Test assertion is: true
Jun 16, 2024 5:23:08 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. ]
Jun 16, 2024 5:23:08 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"]}]
Jun 16, 2024 5:23:08 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"]}]
Jun 16, 2024 5:23:08 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. ]
Jun 16, 2024 5:23:08 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}]
Jun 16, 2024 5:23:08 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}]
Jun 16, 2024 5:23:08 AM com.ibm.ws.security.fat.common.expectations.JsonObjectExpectation validateValueType
INFO: Validating the ValueType of the value found for the expected key
Jun 16, 2024 5:23:08 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. ]
Jun 16, 2024 5:23:08 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"}]
Jun 16, 2024 5:23:08 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"}]
Jun 16, 2024 5:23:08 AM com.ibm.ws.security.fat.common.expectations.JsonObjectExpectation validateValueType
INFO: Validating the ValueType of the value found for the expected key
Jun 16, 2024 5:23:08 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. ]
Jun 16, 2024 5:23:08 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":[]}]
Jun 16, 2024 5:23:08 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":[]}]
Jun 16, 2024 5:23:08 AM com.ibm.ws.security.fat.common.expectations.JsonObjectExpectation validateValueType
INFO: Validating the ValueType of the value found for the expected key
Jun 16, 2024 5:23:08 AM com.ibm.ws.security.fat.common.expectations.JsonObjectExpectation validateNonStringValue
INFO: Validating the value for the expected key as a non-string value
Jun 16, 2024 5:23:08 AM com.ibm.ws.security.fat.common.expectations.JsonObjectExpectation validateJsonNonPrimitiveType
INFO: Validating the value for the expected key as a non-JSON primitive value