Projekt

Obecné

Profil

« Předchozí | Další » 

Revize b8fb2f0d

Přidáno uživatelem Jan Havlíček před více než 4 roky(ů)

Some of the tests rewritten into readable code.

Zobrazit rozdíly:

demo_jh/Deserializer_tests/src/app/App.java
9 9

  
10 10
public class App 
11 11
{
12
    
13
    /**
14
    * When the Serialized and deserialized classes are same, but placed in diff
15
    * packages, the deserialization does not work.
16
    * When they are 
17
    * **/
12 18
    public static void main(String[] args) throws Exception 
13 19
    {
14
        System.out.println("Starting...");
20
        try{
21
            System.out.println("Starting...");
15 22

  
16
        App thisApp = new App();
17
        thisApp.Serialize(new SampleClasses.Simple(), "serialized/simple.out");
18
        SampleClasses.Simple test1 = thisApp.Deserialize("serialized/simple.out");
23
            App thisApp = new App();
24
            //thisApp.Serialize(new SampleClassesOK.Simple(), "serialized/simple.out");
25
            
26
            SampleClassesOK.Simple test1 = thisApp.Deserialize("serialized/simple.out");
27

  
28
        }catch(Exception e)
29
        {
30
            System.out.println(e.toString());
31
            System.out.println(e.getMessage());
32
        }
19 33
    }
20 34

  
21 35
    private <T> T Deserialize(String inputFilePath)

Také k dispozici: Unified diff