ifw-daq  3.0.0-pre2
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 "daqifFake.hpp"
#include "mock/daqifMock.hpp"
#include "mock/managerMock.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 (TestParseDaqContext, Successful)
 
 TEST (TestParseDaqContext, Failures)
 
 TEST_F (TestOcmDaqService, StartDaqShouldTestIfIdAlreadyExistsAndReturnFailureIfItDoes)
 
 TEST_F (TestOcmDaqService, StartDaqShouldCreateAndAssignIdIfNotProvided)
 
 TEST_F (TestOcmDaqService, StartDaqV2ShouldTestIfIdAlreadyExistsAndReturnFailureIfItDoes)
 
 TEST_F (TestOcmDaqService, StartDaqFailsIfJsonIsInvalid)
 
 TEST_F (TestOcmDaqService, StartDaqFailsIfJsonSchemaIsInvalid)
 
 TEST_F (TestOcmDaqService, StartDaqFailsIfPrefixContainsParentPaths)
 
 TEST_F (TestOcmDaqService, StartDaqShouldAddAndStartDaqControllerIfArgumentsAreOk)
 
 TEST_F (TestOcmDaqService, StartDaqShouldFailIfAddDaqFails)
 
 TEST_F (TestOcmDaqService, StartDaqShouldFailIfManagerStartFails)
 
 TEST_F (TestOcmDaqService, StartDaqV2ShouldCreateAndAssignIdIfNotProvided)
 
 TEST_F (TestOcmDaqService, StartDaqV2FailsIfJsonParsingFails)
 
 TEST_F (TestOcmDaqService, StartDaqV2FailsIfSchemaParsingFails)
 
 TEST_F (TestOcmDaqService, StartDaqV2ShouldAddAndStartDaqControllerIfArgumentsAreOk)
 
 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 ( TestParseDaqContext  ,
Failures   
)

Definition at line 189 of file testOcmDaqService.cpp.

◆ TEST() [2/7]

TEST ( TestParseDaqContext  ,
Successful   
)

Definition at line 153 of file testOcmDaqService.cpp.

◆ TEST() [3/7]

TEST ( TestParseMultipleSources  ,
Successful   
)

Definition at line 124 of file testOcmDaqService.cpp.

◆ TEST() [4/7]

TEST ( TestParseSingleSource  ,
Empty   
)

Definition at line 144 of file testOcmDaqService.cpp.

◆ TEST() [5/7]

TEST ( TestParseSingleSource  ,
Incomplete   
)

Definition at line 111 of file testOcmDaqService.cpp.

◆ TEST() [6/7]

TEST ( TestParseSingleSource  ,
LeadingOrTrailingSpacesAreAllowed   
)

Definition at line 104 of file testOcmDaqService.cpp.

◆ TEST() [7/7]

TEST ( TestParseSingleSource  ,
Successful   
)

Definition at line 97 of file testOcmDaqService.cpp.

◆ TEST_F() [1/30]

TEST_F ( TestOcmDaqService  ,
AbortDaqShouldFailIfDaqDoesNotExist   
)

Definition at line 497 of file testOcmDaqService.cpp.

◆ TEST_F() [2/30]

TEST_F ( TestOcmDaqService  ,
AbortDaqShouldSucceedIfMgrOpSuceeds   
)

Definition at line 515 of file testOcmDaqService.cpp.

◆ TEST_F() [3/30]

TEST_F ( TestOcmDaqService  ,
AwaitDaqstateFailsWithInvalidArguments   
)

Definition at line 729 of file testOcmDaqService.cpp.

◆ TEST_F() [4/30]

TEST_F ( TestOcmDaqService  ,
AwaitDaqstateSucceds   
)

Definition at line 751 of file testOcmDaqService.cpp.

◆ TEST_F() [5/30]

TEST_F ( TestOcmDaqService  ,
ForceAbortDaqShouldUseTolerantPolicy   
)

Definition at line 538 of file testOcmDaqService.cpp.

◆ TEST_F() [6/30]

TEST_F ( TestOcmDaqService  ,
ForceStopDaqShouldSucceedIfMgrOpSuceeds   
)

Definition at line 476 of file testOcmDaqService.cpp.

◆ TEST_F() [7/30]

TEST_F ( TestOcmDaqService  ,
GetActiveReturnsActive   
)

Definition at line 689 of file testOcmDaqService.cpp.

◆ TEST_F() [8/30]

TEST_F ( TestOcmDaqService  ,
GetStatusFailsIfDaqDoesNotExist   
)

Definition at line 646 of file testOcmDaqService.cpp.

◆ TEST_F() [9/30]

TEST_F ( TestOcmDaqService  ,
GetStatusSuccedsIfMgrOpSucceeds   
)

Definition at line 663 of file testOcmDaqService.cpp.

◆ TEST_F() [10/30]

TEST_F ( TestOcmDaqService  ,
StartDaqFailsIfJsonIsInvalid   
)

Definition at line 247 of file testOcmDaqService.cpp.

◆ TEST_F() [11/30]

TEST_F ( TestOcmDaqService  ,
StartDaqFailsIfJsonSchemaIsInvalid   
)

Definition at line 257 of file testOcmDaqService.cpp.

◆ TEST_F() [12/30]

TEST_F ( TestOcmDaqService  ,
StartDaqFailsIfPrefixContainsParentPaths   
)

Definition at line 268 of file testOcmDaqService.cpp.

◆ TEST_F() [13/30]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldAddAndStartDaqControllerIfArgumentsAreOk   
)

Definition at line 279 of file testOcmDaqService.cpp.

◆ TEST_F() [14/30]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldCreateAndAssignIdIfNotProvided   
)

Definition at line 208 of file testOcmDaqService.cpp.

◆ TEST_F() [15/30]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldFailIfAddDaqFails   
)

Definition at line 306 of file testOcmDaqService.cpp.

◆ TEST_F() [16/30]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldFailIfManagerStartFails   
)

Definition at line 321 of file testOcmDaqService.cpp.

◆ TEST_F() [17/30]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldTestIfIdAlreadyExistsAndReturnFailureIfItDoes   
)

Definition at line 194 of file testOcmDaqService.cpp.

◆ TEST_F() [18/30]

TEST_F ( TestOcmDaqService  ,
StartDaqV2FailsIfJsonParsingFails   
)

Definition at line 384 of file testOcmDaqService.cpp.

◆ TEST_F() [19/30]

TEST_F ( TestOcmDaqService  ,
StartDaqV2FailsIfSchemaParsingFails   
)

Definition at line 395 of file testOcmDaqService.cpp.

◆ TEST_F() [20/30]

TEST_F ( TestOcmDaqService  ,
StartDaqV2ShouldAddAndStartDaqControllerIfArgumentsAreOk   
)

Definition at line 406 of file testOcmDaqService.cpp.

◆ TEST_F() [21/30]

TEST_F ( TestOcmDaqService  ,
StartDaqV2ShouldCreateAndAssignIdIfNotProvided   
)

Definition at line 340 of file testOcmDaqService.cpp.

◆ TEST_F() [22/30]

TEST_F ( TestOcmDaqService  ,
StartDaqV2ShouldTestIfIdAlreadyExistsAndReturnFailureIfItDoes   
)

Definition at line 233 of file testOcmDaqService.cpp.

◆ TEST_F() [23/30]

TEST_F ( TestOcmDaqService  ,
StopDaqShouldFailIfDaqDoesNotExist   
)

Definition at line 436 of file testOcmDaqService.cpp.

◆ TEST_F() [24/30]

TEST_F ( TestOcmDaqService  ,
StopDaqShouldSucceedIfMgrOpSuceeds   
)

Definition at line 455 of file testOcmDaqService.cpp.

◆ TEST_F() [25/30]

TEST_F ( TestOcmDaqService  ,
UpdateKeywordsFailsIfJsonParseFails   
)

Definition at line 597 of file testOcmDaqService.cpp.

◆ TEST_F() [26/30]

TEST_F ( TestOcmDaqService  ,
UpdateKeywordsFailsIfSchemaParsingFails   
)

Definition at line 624 of file testOcmDaqService.cpp.

◆ TEST_F() [27/30]

TEST_F ( TestOcmDaqService  ,
UpdateKeywordsShouldSucceedIfMgrOpSucceeds   
)

Definition at line 560 of file testOcmDaqService.cpp.

◆ TEST_F() [28/30]

TEST_F ( TestOcmDaqServiceAbandoned  ,
AbortDaq   
)

Definition at line 831 of file testOcmDaqService.cpp.

◆ TEST_F() [29/30]

TEST_F ( TestOcmDaqServiceAbandoned  ,
StartDaq   
)

Definition at line 782 of file testOcmDaqService.cpp.

◆ TEST_F() [30/30]

TEST_F ( TestOcmDaqServiceAbandoned  ,
StopDaq   
)

Definition at line 805 of file testOcmDaqService.cpp.