J
jehugaleahsa
I have a base class called DataObject:
[Serializable]
public abstract class DataObject
{
/* Methods only */
}
[Serializable]
public class Customer : DataObject, ICustomer
{
}
My tests use MemoryStream and BinaryFormatter to tests the
serialization. Something like this:
using (MemoryStream stream = new MemoryStream())
{
BinaryFormatter formatter = new BinaryFormatter();
formatter.Serialize(stream, customer);
stream.Position = 0;
Customer copy = (Customer) formatter.Deserialize(stream);
}
I am using MS' Team System Tester. When I 'Run' these tests, I get an
error claiming that DataObject is not marked serializable. But, if I
'Debug' these tests, they all pass.
It is almost as if testing tool has a bug in it. Is there a reason my
code would work when I 'Debug' it? I also noticed that after the first
'Debug', subsequent 'Run' pass.
Has anyone else run into this?
[Serializable]
public abstract class DataObject
{
/* Methods only */
}
[Serializable]
public class Customer : DataObject, ICustomer
{
}
My tests use MemoryStream and BinaryFormatter to tests the
serialization. Something like this:
using (MemoryStream stream = new MemoryStream())
{
BinaryFormatter formatter = new BinaryFormatter();
formatter.Serialize(stream, customer);
stream.Position = 0;
Customer copy = (Customer) formatter.Deserialize(stream);
}
I am using MS' Team System Tester. When I 'Run' these tests, I get an
error claiming that DataObject is not marked serializable. But, if I
'Debug' these tests, they all pass.
It is almost as if testing tool has a bug in it. Is there a reason my
code would work when I 'Debug' it? I also noticed that after the first
'Debug', subsequent 'Run' pass.
Has anyone else run into this?