ifw-daq  2.1.0-pre1
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, StartDaqFailsIfJsonIsInvalid)
 
 TEST_F (TestOcmDaqService, StartDaqFailsIfJsonSchemaIsInvalid)
 
 TEST_F (TestOcmDaqService, StartDaqFailsIfPrefixContainsParentPaths)
 
 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 ( TestParseDaqContext  ,
Failures   
)

Definition at line 176 of file testOcmDaqService.cpp.

◆ TEST() [2/7]

TEST ( TestParseDaqContext  ,
Successful   
)

Definition at line 140 of file testOcmDaqService.cpp.

◆ TEST() [3/7]

TEST ( TestParseMultipleSources  ,
Successful   
)

Definition at line 111 of file testOcmDaqService.cpp.

◆ TEST() [4/7]

TEST ( TestParseSingleSource  ,
Empty   
)

Definition at line 131 of file testOcmDaqService.cpp.

◆ TEST() [5/7]

TEST ( TestParseSingleSource  ,
Incomplete   
)

Definition at line 98 of file testOcmDaqService.cpp.

◆ TEST() [6/7]

TEST ( TestParseSingleSource  ,
LeadingOrTrailingSpacesAreAllowed   
)

Definition at line 91 of file testOcmDaqService.cpp.

◆ TEST() [7/7]

TEST ( TestParseSingleSource  ,
Successful   
)

Definition at line 84 of file testOcmDaqService.cpp.

◆ TEST_F() [1/25]

TEST_F ( TestOcmDaqService  ,
AbortDaqShouldFailIfDaqDoesNotExist   
)

Definition at line 367 of file testOcmDaqService.cpp.

◆ TEST_F() [2/25]

TEST_F ( TestOcmDaqService  ,
AbortDaqShouldSucceedIfMgrOpSuceeds   
)

Definition at line 383 of file testOcmDaqService.cpp.

◆ TEST_F() [3/25]

TEST_F ( TestOcmDaqService  ,
AwaitDaqstateFailsWithInvalidArguments   
)

Definition at line 597 of file testOcmDaqService.cpp.

◆ TEST_F() [4/25]

TEST_F ( TestOcmDaqService  ,
AwaitDaqstateSucceds   
)

Definition at line 618 of file testOcmDaqService.cpp.

◆ TEST_F() [5/25]

TEST_F ( TestOcmDaqService  ,
ForceAbortDaqShouldUseTolerantPolicy   
)

Definition at line 406 of file testOcmDaqService.cpp.

◆ TEST_F() [6/25]

TEST_F ( TestOcmDaqService  ,
ForceStopDaqShouldSucceedIfMgrOpSuceeds   
)

Definition at line 346 of file testOcmDaqService.cpp.

◆ TEST_F() [7/25]

TEST_F ( TestOcmDaqService  ,
GetActiveReturnsActive   
)

Definition at line 557 of file testOcmDaqService.cpp.

◆ TEST_F() [8/25]

TEST_F ( TestOcmDaqService  ,
GetStatusFailsIfDaqDoesNotExist   
)

Definition at line 514 of file testOcmDaqService.cpp.

◆ TEST_F() [9/25]

TEST_F ( TestOcmDaqService  ,
GetStatusSuccedsIfMgrOpSucceeds   
)

Definition at line 531 of file testOcmDaqService.cpp.

◆ TEST_F() [10/25]

TEST_F ( TestOcmDaqService  ,
StartDaqFailsIfJsonIsInvalid   
)

Definition at line 218 of file testOcmDaqService.cpp.

◆ TEST_F() [11/25]

TEST_F ( TestOcmDaqService  ,
StartDaqFailsIfJsonSchemaIsInvalid   
)

Definition at line 228 of file testOcmDaqService.cpp.

◆ TEST_F() [12/25]

TEST_F ( TestOcmDaqService  ,
StartDaqFailsIfPrefixContainsParentPaths   
)

Definition at line 239 of file testOcmDaqService.cpp.

◆ TEST_F() [13/25]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldAddAndStartDaqControllerIfArgumentsAreOk   
)

Definition at line 250 of file testOcmDaqService.cpp.

◆ TEST_F() [14/25]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldCreateAndAssignIdIfNotProvided   
)

Definition at line 193 of file testOcmDaqService.cpp.

◆ TEST_F() [15/25]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldFailIfAddDaqFails   
)

Definition at line 276 of file testOcmDaqService.cpp.

◆ TEST_F() [16/25]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldFailIfManagerStartFails   
)

Definition at line 290 of file testOcmDaqService.cpp.

◆ TEST_F() [17/25]

TEST_F ( TestOcmDaqService  ,
StartDaqShouldTestIfIdAlreadyExistsAndReturnFailureIfItDoes   
)

Definition at line 181 of file testOcmDaqService.cpp.

◆ TEST_F() [18/25]

TEST_F ( TestOcmDaqService  ,
StopDaqShouldFailIfDaqDoesNotExist   
)

Definition at line 308 of file testOcmDaqService.cpp.

◆ TEST_F() [19/25]

TEST_F ( TestOcmDaqService  ,
StopDaqShouldSucceedIfMgrOpSuceeds   
)

Definition at line 325 of file testOcmDaqService.cpp.

◆ TEST_F() [20/25]

TEST_F ( TestOcmDaqService  ,
UpdateKeywordsFailsIfJsonParseFails   
)

Definition at line 465 of file testOcmDaqService.cpp.

◆ TEST_F() [21/25]

TEST_F ( TestOcmDaqService  ,
UpdateKeywordsFailsIfSchemaParsingFails   
)

Definition at line 492 of file testOcmDaqService.cpp.

◆ TEST_F() [22/25]

TEST_F ( TestOcmDaqService  ,
UpdateKeywordsShouldSucceedIfMgrOpSucceeds   
)

Definition at line 428 of file testOcmDaqService.cpp.

◆ TEST_F() [23/25]

TEST_F ( TestOcmDaqServiceAbandoned  ,
AbortDaq   
)

Definition at line 698 of file testOcmDaqService.cpp.

◆ TEST_F() [24/25]

TEST_F ( TestOcmDaqServiceAbandoned  ,
StartDaq   
)

Definition at line 649 of file testOcmDaqService.cpp.

◆ TEST_F() [25/25]

TEST_F ( TestOcmDaqServiceAbandoned  ,
StopDaq   
)

Definition at line 672 of file testOcmDaqService.cpp.