chore: first test iteration
[KDIS.git] / test / PDU_ProtocolFamily5.cpp
blobf962e2d07d3c05b62203fd867b4408897f9be72e
1 #include <iostream>
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"
37 using namespace KDIS;
38 using namespace PDU;
39 using namespace DATA_TYPE::ENUMS;
41 //////////////////////////////////////////////////////////////////////////
42 // Distributed Emission Regeneration
43 //////////////////////////////////////////////////////////////////////////
45 TEST(PDU_ProtocolFamily5, Designator_PDU)
47 Designator_PDU 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)
63 Collision_PDU pdu;
64 EXPECT_EQ(Entity_Information_Interaction, pdu.GetProtocolFamily());
67 TEST(PDU_ProtocolFamily5, Entity_State_PDU)
69 Entity_State_PDU pdu;
70 EXPECT_EQ(Entity_Information_Interaction, pdu.GetProtocolFamily());
73 //////////////////////////////////////////////////////////////////////////
74 // Logistics
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)
119 Receiver_PDU pdu;
120 EXPECT_EQ(Radio_Communications, pdu.GetProtocolFamily());
123 TEST(PDU_ProtocolFamily5, Signal_PDU)
125 Signal_PDU pdu;
126 EXPECT_EQ(Radio_Communications, pdu.GetProtocolFamily());
129 TEST(PDU_ProtocolFamily5, Transmitter_PDU)
131 Transmitter_PDU pdu;
132 EXPECT_EQ(Radio_Communications, pdu.GetProtocolFamily());
135 //////////////////////////////////////////////////////////////////////////
136 // Simulation Management
137 //////////////////////////////////////////////////////////////////////////
139 TEST(PDU_ProtocolFamily5, Acknowledge_PDU)
141 Acknowledge_PDU 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)
159 Comment_PDU 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)
171 Data_PDU pdu;
172 EXPECT_EQ(Simulation_Management, pdu.GetProtocolFamily());
175 TEST(PDU_ProtocolFamily5, Data_Query_PDU)
177 Data_Query_PDU 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)
195 Set_Data_PDU 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)
207 Stop_Freeze_PDU pdu;
208 EXPECT_EQ(Simulation_Management, pdu.GetProtocolFamily());
211 //////////////////////////////////////////////////////////////////////////
212 // Warfare
213 //////////////////////////////////////////////////////////////////////////
215 TEST(PDU_ProtocolFamily5, Detonation_PDU)
217 Detonation_PDU pdu;
218 EXPECT_EQ(Warfare, pdu.GetProtocolFamily());
221 TEST(PDU_ProtocolFamily5, Fire_PDU)
223 Fire_PDU pdu;
224 EXPECT_EQ(Warfare, pdu.GetProtocolFamily());