Mercurial > hg > orthanc
comparison UnitTests/ServerIndex.cpp @ 190:b6cef9d45cc3
getallpublicids
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 13 Nov 2012 11:20:50 +0100 |
parents | 090cefdab1d1 |
children | a1b9d1e1497b |
comparison
equal
deleted
inserted
replaced
189:ccbc2cf64a0d | 190:b6cef9d45cc3 |
---|---|
51 index.CreateResource("d", ResourceType_Instance), // 3 | 51 index.CreateResource("d", ResourceType_Instance), // 3 |
52 index.CreateResource("e", ResourceType_Instance), // 4 | 52 index.CreateResource("e", ResourceType_Instance), // 4 |
53 index.CreateResource("f", ResourceType_Instance), // 5 | 53 index.CreateResource("f", ResourceType_Instance), // 5 |
54 index.CreateResource("g", ResourceType_Study) // 6 | 54 index.CreateResource("g", ResourceType_Study) // 6 |
55 }; | 55 }; |
56 | |
57 { | |
58 Json::Value t; | |
59 index.GetAllPublicIds(t, ResourceType_Patient); | |
60 | |
61 ASSERT_EQ(1, t.size()); | |
62 ASSERT_EQ("a", t[0u].asString()); | |
63 | |
64 index.GetAllPublicIds(t, ResourceType_Series); | |
65 ASSERT_EQ(1, t.size()); | |
66 ASSERT_EQ("c", t[0u].asString()); | |
67 | |
68 index.GetAllPublicIds(t, ResourceType_Study); | |
69 ASSERT_EQ(2, t.size()); | |
70 | |
71 index.GetAllPublicIds(t, ResourceType_Instance); | |
72 ASSERT_EQ(3, t.size()); | |
73 } | |
56 | 74 |
57 index.SetGlobalProperty("Hello", "World"); | 75 index.SetGlobalProperty("Hello", "World"); |
58 | 76 |
59 index.AttachChild(a[0], a[1]); | 77 index.AttachChild(a[0], a[1]); |
60 index.AttachChild(a[1], a[2]); | 78 index.AttachChild(a[1], a[2]); |