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