Belle II Software development
eclHitAssignment.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include <ecl/dataobjects/ECLHitAssignment.h>
9
10#include <gtest/gtest.h>
11
12using namespace std;
13
14namespace Belle2 {
21 class ECLHitAssignmentTest : public ::testing::Test {
22 };
23
25 TEST_F(ECLHitAssignmentTest, Constructors)
26 {
27 ECLHitAssignment myECLHitAssignment;
28 EXPECT_EQ(myECLHitAssignment.getShowerId(), 0);
29 EXPECT_EQ(myECLHitAssignment.getCellId(), 0);
30 const int showerId = 1;
31 const int cellId = 2;
32 ECLHitAssignment myECLHitAssignment2(showerId, cellId);
33 EXPECT_EQ(myECLHitAssignment2.getShowerId(), showerId);
34 EXPECT_EQ(myECLHitAssignment2.getCellId(), cellId);
35 } // Testcases for Something
36
38 TEST_F(ECLHitAssignmentTest, SettersAndGetters)
39 {
40 const int showerId = 1;
41 const int cellId = 2;
42 ECLHitAssignment myECLHitAssignment;
43 myECLHitAssignment.setShowerId(showerId);
44 myECLHitAssignment.setCellId(cellId);
45 EXPECT_EQ(myECLHitAssignment.getShowerId(), showerId);
46 EXPECT_EQ(myECLHitAssignment.getCellId(), cellId);
47 } // Testcases for Setters and Getters
49} // namespace
Set up a few arrays and objects in the datastore.
int getCellId() const
The method to get cell id.
int getShowerId() const
The method to get shower id.
void setCellId(int cellId)
The method to set cell id.
void setShowerId(int showerId)
The method to set shower id.
Abstract base class for different kinds of events.
STL namespace.