hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ReducingOutputMessageTest.cpp
Go to the documentation of this file.
1 /*
2  * ReducingOutputMessageTest.cpp
3  *
4  * Created on: May 28, 2013
5  * Author: igor
6  */
7 
8 #include <gtest/gtest.h>
10 
11 using namespace HCE::reduce_types;
12 using namespace std;
13 
14 TEST(ReducingOutputMessage, returnCorrectFieldValues)
15 {
16  int processingErrorCode = 0;
17  string processingErrorMsg = "OK";
18  HCE::types::MessageType processingType = HCE::types::MessageType::mtDrce;
19  int ttl = 8;
20  string body = "reducing result";
21  int processingElapsedTime = 100;
22 
23  ReducingOutputMessage reducingOutputMessage(processingType, ttl, body,
24  processingErrorCode, processingErrorMsg, processingElapsedTime);
25 
26  EXPECT_EQ(reducingOutputMessage.getProcessingErrorCode(), processingErrorCode);
27  EXPECT_EQ(reducingOutputMessage.getProcessingErrorMsg(), processingErrorMsg);
28  EXPECT_EQ(reducingOutputMessage.getProcessingElapsedTime(), processingElapsedTime);
29 }