harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jimmy, Jing Lv" <firep...@gmail.com>
Subject [classlib] trying new framework for testing serialization (was:Merging frameworks for testing serialization - first step)
Date Fri, 30 Jun 2006 08:02:50 GMT
Hi Stepan:

    Seems the new framework for serialization has added to Harmony, I'm 
trying it and find it interesting. However I have a few questions:

1. It is strange that SerializationTest is an abstract class extends 
junit.framework.testcase,  in this case I can either (a) extends 
SerializationTest directly, implements getData() and run, it shall run 
"testSelf" and "testGolden", but how to control more complex situation 
in this way? or (b) write a test extends testcase, and use static 
methods "verifySelf" and "verifyGolden" in SerializationTest as 
Guidelines says, however I wonder why it extends testcase?

2. It is strange verifyGolden(test, object) has two parameter, but in 
the example in the Guidelines says:"
	public void testSerializationCompatibility()
         	throws Exception {
	    SerializationTest.verifyGolden(new SomeSerializableClass());
	}"  something lost?
    And I guess the first parameter is used only to parse the name of 
resource file. If so, may it change the parameter to a String, or 
something else?

3. The test needs ser-files, so it may be necessary to add a method to 
create this file easily just like the old framework. I find a protected 
method produceGoldenFiles(), is that used for it (why protected?)? This 
may be necessary to guildance.
What's more, the ser-file must be end with ".ser", but in new framework, 
I still find it uses ".dat" . And the path is "test/common/unit/..." but 
in Harmony's Test Guildance tells:"/src/test/resources/serialization..."

Your comments? Thanks!


Best Regards!

Jimmy, Jing Lv
China Software Development Lab, IBM

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message