private static UTF8Type ConvertFrom(object o) { var type = new UTF8Type(); type.SetValue(o); return(type); }
private static T ConvertTo <T>(UTF8Type type) { if (type == null) { return(default(T)); } return(type.GetValue <T>()); }
public void Implicit_String_Cast() { // arrange string expected = "The quick brown fox jumps over the lazy dog."; // act UTF8Type actual = expected; // assert Assert.Equal(expected, (string)actual); }
public void Operator_NotEqualTo() { // arrange var value = "The quick brown fox jumps over the lazy dog."; UTF8Type type = value; // act bool actual = type != value; // assert Assert.False(actual); }
public void CassandraType_Cast() { // arranage string expected = "The quick brown fox jumps over the lazy dog."; UTF8Type actualType = expected; // act CassandraObject actual = actualType; // assert Assert.Equal(expected, (string)actual); }