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

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

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

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