-
February 22nd, 2011, 05:23 AM
#1
Unit test serialization error
Ok so I have the following code as my unit test:
namespace MusicTest
{
[TestClass]
public class MusicGig
{
[TestMethod]
public static Stream Serialize(object source)
{
IFormatter formatter = new BinaryFormatter();
Stream stream = new MemoryStream();
formatter.Serialize(stream, source);
return stream;
}
}
}
however when I try and run the test I get the following error..
UTA007: Method Serialize defined in class MusicTest.MusicGig does not have correct signature. Test method marked with the [TestMethod] attribute must be non-static, public, does not return a value and should not take any parameter. for example: public void Test.Class1.Test().
It has me confused, is it just a simple code error somewhere?
Thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|