-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
xstream/src/test/com/thoughtworks/acceptance/Collections09Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright (C) 2021 XStream Committers. | ||
* All rights reserved. | ||
* | ||
* The software in this package is published under the terms of the BSD | ||
* style license a copy of which has been included with this distribution in | ||
* the LICENSE.txt file. | ||
* | ||
* Created on 15. May 2021 by Joerg Schaible | ||
*/ | ||
package com.thoughtworks.acceptance; | ||
|
||
import java.util.List; | ||
|
||
|
||
public class Collections09Test extends AbstractAcceptanceTest { | ||
|
||
public void testListFromListOf() { | ||
xstream.allowTypes("java.util.CollSer"); | ||
|
||
final List<String> list = List.of("hi", "bye"); | ||
|
||
assertBothWays(list, ""// | ||
+ "<java.util.ImmutableCollections_-List12 resolves-to=\"java.util.CollSer\" serialization=\"custom\">\n" | ||
+ " <java.util.CollSer>\n" | ||
+ " <default>\n" | ||
+ " <tag>1</tag>\n" | ||
+ " </default>\n" | ||
+ " <int>2</int>\n" | ||
+ " <string>hi</string>\n" | ||
+ " <string>bye</string>\n" | ||
+ " </java.util.CollSer>\n" | ||
+ "</java.util.ImmutableCollections_-List12>"); | ||
} | ||
} |