Jimmy, Jing Lv wrote:
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?


By reading old threads, I've aware that these two ways are both OK, but the Guidelines say nothing about it, so may you tell me some detail about it? Thanks! :)

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to