2 #include "gtest/gtest.h"
4 #include "KDIS/PDU/Distributed_Emission_Regeneration/Designator_PDU.h"
5 #include "KDIS/PDU/Distributed_Emission_Regeneration/Electromagnetic_Emission_PDU.h"
7 #include "KDIS/PDU/Entity_Info_Interaction/Collision_PDU.h"
8 #include "KDIS/PDU/Entity_Info_Interaction/Entity_State_PDU.h"
10 #include "KDIS/PDU/Logistics/Repair_Complete_PDU.h"
11 #include "KDIS/PDU/Logistics/Repair_Response_PDU.h"
12 #include "KDIS/PDU/Logistics/Resupply_Cancel_PDU.h"
13 #include "KDIS/PDU/Logistics/Resupply_Offer_PDU.h"
14 #include "KDIS/PDU/Logistics/Resupply_Received_PDU.h"
15 #include "KDIS/PDU/Logistics/Service_Request_PDU.h"
17 #include "KDIS/PDU/Radio_Communications/Receiver_PDU.h"
18 #include "KDIS/PDU/Radio_Communications/Signal_PDU.h"
19 #include "KDIS/PDU/Radio_Communications/Transmitter_PDU.h"
21 #include "KDIS/PDU/Simulation_Management/Acknowledge_PDU.h"
22 #include "KDIS/PDU/Simulation_Management/Action_Request_PDU.h"
23 #include "KDIS/PDU/Simulation_Management/Action_Response_PDU.h"
24 #include "KDIS/PDU/Simulation_Management/Comment_PDU.h"
25 #include "KDIS/PDU/Simulation_Management/Create_Entity_PDU.h"
26 #include "KDIS/PDU/Simulation_Management/Data_PDU.h"
27 #include "KDIS/PDU/Simulation_Management/Data_Query_PDU.h"
28 #include "KDIS/PDU/Simulation_Management/Event_Report_PDU.h"
29 #include "KDIS/PDU/Simulation_Management/Remove_Entity_PDU.h"
30 #include "KDIS/PDU/Simulation_Management/Set_Data_PDU.h"
31 #include "KDIS/PDU/Simulation_Management/Start_Resume_PDU.h"
32 #include "KDIS/PDU/Simulation_Management/Stop_Freeze_PDU.h"
34 #include "KDIS/PDU/Warfare/Detonation_PDU.h"
35 #include "KDIS/PDU/Warfare/Fire_PDU.h"
39 using namespace DATA_TYPE::ENUMS
;
41 //////////////////////////////////////////////////////////////////////////
42 // Distributed Emission Regeneration
43 //////////////////////////////////////////////////////////////////////////
45 TEST(PDU_ProtocolFamily5
, Designator_PDU
)
48 EXPECT_EQ(Distributed_Emission_Regeneration
, pdu
.GetProtocolFamily());
51 TEST(PDU_ProtocolFamily5
, Electromagnetic_Emission_PDU
)
53 Electromagnetic_Emission_PDU pdu
;
54 EXPECT_EQ(Distributed_Emission_Regeneration
, pdu
.GetProtocolFamily());
57 //////////////////////////////////////////////////////////////////////////
58 // Entity Info Interaction
59 //////////////////////////////////////////////////////////////////////////
61 TEST(PDU_ProtocolFamily5
, Collision_PDU
)
64 EXPECT_EQ(Entity_Information_Interaction
, pdu
.GetProtocolFamily());
67 TEST(PDU_ProtocolFamily5
, Entity_State_PDU
)
70 EXPECT_EQ(Entity_Information_Interaction
, pdu
.GetProtocolFamily());
73 //////////////////////////////////////////////////////////////////////////
75 //////////////////////////////////////////////////////////////////////////
77 TEST(PDU_ProtocolFamily5
, Repair_Complete_PDU
)
79 Repair_Complete_PDU pdu
;
80 EXPECT_EQ(Logistics
, pdu
.GetProtocolFamily());
83 TEST(PDU_ProtocolFamily5
, Repair_Response_PDU
)
85 Repair_Response_PDU pdu
;
86 EXPECT_EQ(Logistics
, pdu
.GetProtocolFamily());
89 TEST(PDU_ProtocolFamily5
, Resupply_Cancel_PDU
)
91 Resupply_Cancel_PDU pdu
;
92 EXPECT_EQ(Logistics
, pdu
.GetProtocolFamily());
95 TEST(PDU_ProtocolFamily5
, Resupply_Offer_PDU
)
97 Resupply_Offer_PDU pdu
;
98 EXPECT_EQ(Logistics
, pdu
.GetProtocolFamily());
101 TEST(PDU_ProtocolFamily5
, Resupply_Received_PDU
)
103 Resupply_Received_PDU pdu
;
104 EXPECT_EQ(Logistics
, pdu
.GetProtocolFamily());
107 TEST(PDU_ProtocolFamily5
, Service_Request_PDU
)
109 Service_Request_PDU pdu
;
110 EXPECT_EQ(Logistics
, pdu
.GetProtocolFamily());
113 //////////////////////////////////////////////////////////////////////////
114 // Radio Communications
115 //////////////////////////////////////////////////////////////////////////
117 TEST(PDU_ProtocolFamily5
, Receiver_PDU
)
120 EXPECT_EQ(Radio_Communications
, pdu
.GetProtocolFamily());
123 TEST(PDU_ProtocolFamily5
, Signal_PDU
)
126 EXPECT_EQ(Radio_Communications
, pdu
.GetProtocolFamily());
129 TEST(PDU_ProtocolFamily5
, Transmitter_PDU
)
132 EXPECT_EQ(Radio_Communications
, pdu
.GetProtocolFamily());
135 //////////////////////////////////////////////////////////////////////////
136 // Simulation Management
137 //////////////////////////////////////////////////////////////////////////
139 TEST(PDU_ProtocolFamily5
, Acknowledge_PDU
)
142 EXPECT_EQ(Simulation_Management
, pdu
.GetProtocolFamily());
145 TEST(PDU_ProtocolFamily5
, Action_Request_PDU
)
147 Action_Request_PDU pdu
;
148 EXPECT_EQ(Simulation_Management
, pdu
.GetProtocolFamily());
151 TEST(PDU_ProtocolFamily5
, Action_Response_PDU
)
153 Action_Response_PDU pdu
;
154 EXPECT_EQ(Simulation_Management
, pdu
.GetProtocolFamily());
157 TEST(PDU_ProtocolFamily5
, Comment_PDU
)
160 EXPECT_EQ(Simulation_Management
, pdu
.GetProtocolFamily());
163 TEST(PDU_ProtocolFamily5
, Create_Entity_PDU
)
165 Create_Entity_PDU pdu
;
166 EXPECT_EQ(Simulation_Management
, pdu
.GetProtocolFamily());
169 TEST(PDU_ProtocolFamily5
, Data_PDU
)
172 EXPECT_EQ(Simulation_Management
, pdu
.GetProtocolFamily());
175 TEST(PDU_ProtocolFamily5
, Data_Query_PDU
)
178 EXPECT_EQ(Simulation_Management
, pdu
.GetProtocolFamily());
181 TEST(PDU_ProtocolFamily5
, Event_Report_PDU
)
183 Event_Report_PDU pdu
;
184 EXPECT_EQ(Simulation_Management
, pdu
.GetProtocolFamily());
187 TEST(PDU_ProtocolFamily5
, Remove_Entity_PDU
)
189 Remove_Entity_PDU pdu
;
190 EXPECT_EQ(Simulation_Management
, pdu
.GetProtocolFamily());
193 TEST(PDU_ProtocolFamily5
, Set_Data_PDU
)
196 EXPECT_EQ(Simulation_Management
, pdu
.GetProtocolFamily());
199 TEST(PDU_ProtocolFamily5
, Start_Resume_PDU
)
201 Start_Resume_PDU pdu
;
202 EXPECT_EQ(Simulation_Management
, pdu
.GetProtocolFamily());
205 TEST(PDU_ProtocolFamily5
, Stop_Freeze_PDU
)
208 EXPECT_EQ(Simulation_Management
, pdu
.GetProtocolFamily());
211 //////////////////////////////////////////////////////////////////////////
213 //////////////////////////////////////////////////////////////////////////
215 TEST(PDU_ProtocolFamily5
, Detonation_PDU
)
218 EXPECT_EQ(Warfare
, pdu
.GetProtocolFamily());
221 TEST(PDU_ProtocolFamily5
, Fire_PDU
)
224 EXPECT_EQ(Warfare
, pdu
.GetProtocolFamily());