ifw-daq  1.0.0
IFW Data Acquisition modules
Classes | Functions
testOcmDaqService.cpp File Reference

Unit tests for OcmDaqService. More...

#include <ocmDaqService.hpp>
#include <fmt/format.h>
#include <gtest/gtest.h>
#include <daq/error.hpp>
#include <malMock.hpp>
#include <metadaqifMock.hpp>
#include <recifMock.hpp>
#include "mock/managerMock.hpp"
#include "mock/ocmifMock.hpp"
#include "ocmifFake.hpp"

Go to the source code of this file.

Classes

struct  TestOcmDaqService
 Fixture that sets up a OcmDaqService instance with following mockups: More...
 
struct  TestOcmDaqServiceAbandoned
 Fixture for testing when OcmDaqService is abandoned (e.g. More...
 

Functions

 TEST (TestParseSingleSource, Successful)
 
 TEST (TestParseSingleSource, LeadingOrTrailingSpacesAreAllowed)
 
 TEST (TestParseSingleSource, Incomplete)
 
 TEST (TestParseMultipleSources, Successful)
 
 TEST (TestParseSingleSource, Empty)
 
 TEST (TestParseDaqProperties, Successful)
 
 TEST (TestParseDaqProperties, Failures)
 
 TEST_F (TestOcmDaqService, StartDaqShouldTestIfIdAlreadyExistsAndReturnFailureIfItDoes)
 
 TEST_F (TestOcmDaqService, StartDaqShouldCreateAndAssignIdIfNotProvided)
 
 TEST_F (TestOcmDaqService, StartDaqFailsIfJsonIsInvalid)
 
 TEST_F (TestOcmDaqService, StartDaqFailsIfJsonSchemaIsInvalid)
 
 TEST_F (TestOcmDaqService, StartDaqShouldAddAndStartDaqControllerIfArgumentsAreOk)
 
 TEST_F (TestOcmDaqService, StartDaqShouldFailIfAddDaqFails)
 
 TEST_F (TestOcmDaqService, StartDaqShouldFailIfManagerStartFails)
 
 TEST_F (TestOcmDaqService, StopDaqShouldFailIfDaqDoesNotExist)
 
 TEST_F (TestOcmDaqService, StopDaqShouldSucceedIfMgrOpSuceeds)
 
 TEST_F (TestOcmDaqService, ForceStopDaqShouldSucceedIfMgrOpSuceeds)
 
 TEST_F (TestOcmDaqService, AbortDaqShouldFailIfDaqDoesNotExist)
 
 TEST_F (TestOcmDaqService, AbortDaqShouldSucceedIfMgrOpSuceeds)
 
 TEST_F (TestOcmDaqService, ForceAbortDaqShouldUseTolerantPolicy)
 
 TEST_F (TestOcmDaqService, UpdateKeywordsShouldSucceedIfMgrOpSucceeds)
 
 TEST_F (TestOcmDaqService, UpdateKeywordsFailsIfJsonParseFails)
 
 TEST_F (TestOcmDaqService, UpdateKeywordsFailsIfSchemaParsingFails)
 
 TEST_F (TestOcmDaqService, GetStatusFailsIfDaqDoesNotExist)
 
 TEST_F (TestOcmDaqService, GetStatusSuccedsIfMgrOpSucceeds)
 
 TEST_F (TestOcmDaqService, GetActiveReturnsActive)
 
 TEST_F (TestOcmDaqService, AwaitDaqstateFailsWithInvalidArguments)
 
 TEST_F (TestOcmDaqService, AwaitDaqstateSucceds)
 
 TEST_F (TestOcmDaqServiceAbandoned, StartDaq)
 
 TEST_F (TestOcmDaqServiceAbandoned, StopDaq)
 
 TEST_F (TestOcmDaqServiceAbandoned, AbortDaq)
 

Detailed Description

Unit tests for OcmDaqService.

Definition in file testOcmDaqService.cpp.

Function Documentation

◆ TEST() [1/7]

TEST ( TestParseDaqProperties  ,
Failures   
)

Definition at line 189 of file testOcmDaqService.cpp.

◆ TEST() [2/7]

TEST ( TestParseDaqProperties  ,
Successful   
)

Definition at line 152 of file testOcmDaqService.cpp.

◆ TEST() [3/7]

TEST ( TestParseMultipleSources  ,
Successful   
)

Definition at line 116 of file testOcmDaqService.cpp.

◆ TEST() [4/7]

TEST ( TestParseSingleSource  ,
Empty   
)

Definition at line 142 of file testOcmDaqService.cpp.

◆ TEST() [5/7]

TEST ( TestParseSingleSource  ,
Incomplete   
)

Definition at line 101 of file testOcmDaqService.cpp.

◆ TEST() [6/7]

TEST ( TestParseSingleSource  ,
LeadingOrTrailingSpacesAreAllowed   
)

Definition at line 88 of file testOcmDaqService.cpp.

◆ TEST() [7/7]

TEST ( TestParseSingleSource  ,
Successful   
)

Definition at line 80 of file testOcmDaqService.cpp.

◆ TEST_F() [1/24]

TEST_F ( TestOcmDaqService  ,
AbortDaqShouldFailIfDaqDoesNotExist   
)

Definition at line 388 of file testOcmDaqService.cpp.

◆ TEST_F() [2/24]

TEST_F ( TestOcmDaqService  ,
AbortDaqShouldSucceedIfMgrOpSuceeds   
)

Definition at line 404 of file testOcmDaqService.cpp.

◆ TEST_F() [3/24]

TEST_F ( TestOcmDaqService  ,
AwaitDaqstateFailsWithInvalidArguments   
)

Definition at line 619 of file testOcmDaqService.cpp.

◆ TEST_F() [4/24]

TEST_F ( TestOcmDaqService  ,
AwaitDaqstateSucceds   
)

Definition at line 641 of file testOcmDaqService.cpp.

◆ TEST_F() [5/24]

TEST_F ( TestOcmDaqService  ,
ForceAbortDaqShouldUseTolerantPolicy   
)

Definition at line 427 of file testOcmDaqService.cpp.

◆ TEST_F() [6/24]

TEST_F ( TestOcmDaqService  ,
ForceStopDaqShouldSucceedIfMgrOpSuceeds   
)

Definition at line 366 of file testOcmDaqService.cpp.

◆ TEST_F() [7/24]

TEST_F ( TestOcmDaqService  ,
GetActiveReturnsActive   
)

Definition at line 579 of file testOcmDaqService.cpp.

◆ TEST_F() [8/24]

TEST_F ( TestOcmDaqService  ,
GetStatusFailsIfDaqDoesNotExist   
)

Definition at line 536 of file testOcmDaqService.cpp.

◆ TEST_F() [9/24]

TEST_F ( TestOcmDaqService  ,
GetStatusSuccedsIfMgrOpSucceeds   
)

Definition at line 553 of file testOcmDaqService.cpp.

◆ TEST_F() [10/24]

TEST_F ( TestOcmDaqService  ,
StartDaqFailsIfJsonIsInvalid   
)

Definition at line 239 of file testOcmDaqService.cpp.

◆ TEST_F() [11/24]

TEST_F ( TestOcmDaqService  ,
StartDaqFailsIfJsonSchemaIsInvalid   
)

Definition at line 249 of file testOcmDaqService.cpp.

◆ TEST_F() [12/24]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldAddAndStartDaqControllerIfArgumentsAreOk   
)

Definition at line 260 of file testOcmDaqService.cpp.

◆ TEST_F() [13/24]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldCreateAndAssignIdIfNotProvided   
)

Definition at line 208 of file testOcmDaqService.cpp.

◆ TEST_F() [14/24]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldFailIfAddDaqFails   
)

Definition at line 289 of file testOcmDaqService.cpp.

◆ TEST_F() [15/24]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldFailIfManagerStartFails   
)

Definition at line 308 of file testOcmDaqService.cpp.

◆ TEST_F() [16/24]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldTestIfIdAlreadyExistsAndReturnFailureIfItDoes   
)

Definition at line 196 of file testOcmDaqService.cpp.

◆ TEST_F() [17/24]

TEST_F ( TestOcmDaqService  ,
StopDaqShouldFailIfDaqDoesNotExist   
)

Definition at line 328 of file testOcmDaqService.cpp.

◆ TEST_F() [18/24]

TEST_F ( TestOcmDaqService  ,
StopDaqShouldSucceedIfMgrOpSuceeds   
)

Definition at line 345 of file testOcmDaqService.cpp.

◆ TEST_F() [19/24]

TEST_F ( TestOcmDaqService  ,
UpdateKeywordsFailsIfJsonParseFails   
)

Definition at line 487 of file testOcmDaqService.cpp.

◆ TEST_F() [20/24]

TEST_F ( TestOcmDaqService  ,
UpdateKeywordsFailsIfSchemaParsingFails   
)

Definition at line 514 of file testOcmDaqService.cpp.

◆ TEST_F() [21/24]

TEST_F ( TestOcmDaqService  ,
UpdateKeywordsShouldSucceedIfMgrOpSucceeds   
)

Definition at line 449 of file testOcmDaqService.cpp.

◆ TEST_F() [22/24]

TEST_F ( TestOcmDaqServiceAbandoned  ,
AbortDaq   
)

Definition at line 727 of file testOcmDaqService.cpp.

◆ TEST_F() [23/24]

TEST_F ( TestOcmDaqServiceAbandoned  ,
StartDaq   
)

Definition at line 673 of file testOcmDaqService.cpp.

◆ TEST_F() [24/24]

TEST_F ( TestOcmDaqServiceAbandoned  ,
StopDaq   
)

Definition at line 701 of file testOcmDaqService.cpp.