public void Should_serialize_and_deserialize_valid_token() { RefToken.Parse("client:client1").SerializeAndDeserialize(new RefTokenConverter()); }
public void Should_convert_user_token_to_string() { var token = RefToken.Parse("client:client1"); Assert.Equal("client:client1", token.ToString()); }
public void Should_throw_exception_if_parsing_invalid_input(string input) { Assert.Throws <ArgumentException>(() => RefToken.Parse(input)); }
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)); }
public void Should_instantiate_token_and_lower_type() { var token = RefToken.Client("client1"); Assert.Equal("client:client1", token.ToString()); }