public void CanWrite_ReturnsFalse_IfValueIsAList() { object value = new ArrayList(); Assert.IsFalse(writer.CanWrite(value, value.GetType())); value = new List <int>(); Assert.IsFalse(writer.CanWrite(value, value.GetType())); }
public void CanWrite_ReturnsFalse_IfObjectNotInCache() { Expect.Once.On(valuesCache).Method("Contains").Will(Return.Value(false)); Assert.IsFalse(writer.CanWrite(this, GetType())); }
public bool CanWrite(object instance, Type referencedAsType) { return(objectWriter.CanWrite(instance, referencedAsType)); }
public void CanWrite_ReturnsFalse_IfAnObject() { Assert.IsFalse(writer.CanWrite(this, GetType())); }
public void CanWrite_ReturnsFalse_IfValueIsAnInteger() { Assert.IsFalse(writer.CanWrite(2, typeof(int))); }