Exemple #1
0
 public void Should_serialize_and_deserialize_valid_token()
 {
     RefToken.Parse("client:client1").SerializeAndDeserialize(new RefTokenConverter());
 }
Exemple #2
0
        public void Should_convert_user_token_to_string()
        {
            var token = RefToken.Parse("client:client1");

            Assert.Equal("client:client1", token.ToString());
        }
Exemple #3
0
 public void Should_throw_exception_if_parsing_invalid_input(string input)
 {
     Assert.Throws <ArgumentException>(() => RefToken.Parse(input));
 }
Exemple #4
0
        public void Should_serialize_and_deserialize_null_token()
        {
            RefToken value = null;

            value.SerializeAndDeserialize(new RefTokenConverter());
        }
 public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
 {
     return(RefToken.Parse((string)value));
 }
Exemple #6
0
        public void Should_instantiate_token_and_lower_type()
        {
            var token = RefToken.Client("client1");

            Assert.Equal("client:client1", token.ToString());
        }