root / src / test / scala / gr / grnet / aquarium / user / UserActorTest.scala @ 1981de11
History | View | Annotate | Download (671 Bytes)
1 |
package gr.grnet.aquarium.user |
---|---|
2 |
|
3 |
import org.junit.Test |
4 |
|
5 |
/** |
6 |
* |
7 |
* @author Georgios Gousios <gousiosg@gmail.com> |
8 |
*/ |
9 |
|
10 |
class UserActorTest { |
11 |
|
12 |
@Test |
13 |
def testUserStateSerialization = { |
14 |
val now = System.currentTimeMillis() |
15 |
val state = UserState( |
16 |
"1", |
17 |
ActiveSuspendedSnapshot(true, now), |
18 |
CreditSnapshot(0, now), |
19 |
AgreementSnapshot("default", now), |
20 |
RolesSnapshot(Nil, now), |
21 |
PaymentOrdersSnapshot(Nil, now), |
22 |
OwnedGroupsSnapshot(Nil, now), |
23 |
GroupMembershipsSnapshot(Nil, now), |
24 |
OwnedResourcesSnapshot(ResourceInstanceSnapshot("foo", "1", 0.1F, 1) :: Nil, now) |
25 |
) |
26 |
|
27 |
val json = state.toJson |
28 |
println(json) |
29 |
} |
30 |
} |