Ejemplo n.º 1
0
        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()));
 }
Ejemplo n.º 3
0
 public bool CanWrite(object instance, Type referencedAsType)
 {
     return(objectWriter.CanWrite(instance, referencedAsType));
 }
Ejemplo n.º 4
0
 public void CanWrite_ReturnsFalse_IfAnObject()
 {
     Assert.IsFalse(writer.CanWrite(this, GetType()));
 }
Ejemplo n.º 5
0
 public void CanWrite_ReturnsFalse_IfValueIsAnInteger()
 {
     Assert.IsFalse(writer.CanWrite(2, typeof(int)));
 }