public virtual void _should_be_serializable()
        {
            var res = RequestResponseJsonConverter.Serialize(Sut);

            res.Should()
            .BeEquivalentTo(Json);
        }
        public virtual void _with_custom_fields_should_be_serializable()
        {
            var res = RequestResponseJsonConverter.Serialize(SutWithCustomFields);

            res.Should()
            .BeEquivalentTo(JsonWithCustomFields);
        }
Exemplo n.º 3
0
        public string GetWebSdkConfig()
        {
            var parsedToken = _authTokenParser.ParseToken(_credentialProvider.Token);

            if (parsedToken == null)
            {
                throw new Exception("The provided token is invalid.");
            }

            IDictionary <string, object> configParams = new Dictionary <string, object>()
            {
                { "truCodeUrl", _configuration.EndpointUrl },
                { "relyingPartyId", parsedToken.Subject }
            };

            return(RequestResponseJsonConverter.Serialize(configParams)
                   .Replace(System.Environment.NewLine, string.Empty)
                   .Replace("  ", ""));
        }