MCPcopy Create free account
hub / github.com/ComodoSecurity/openedr / testCommandExecution

Function testCommandExecution

edrav2/iprj/libcore/test/test_command.cpp:58–123  ·  view source on GitHub ↗

Testing call command with different ways [0, c_nExecWayCount)

Source from the content-addressed store, hash-verified

56// Testing call command with different ways [0, c_nExecWayCount)
57//
58Variant testCommandExecution(Variant vProcessor, Variant vCommand, Variant vParams, Size nWay)
59{
60 switch (nWay)
61 {
62 case 0:
63 {
64 auto pCmd = queryInterface<ICommand>(createObject(CLSID_Command, Dictionary({
65 {"processor", vProcessor},
66 {"command", vCommand},
67 {"params", vParams},
68 })));
69 return pCmd->execute();
70 }
71 case 1:
72 {
73 auto pCmd = queryInterface<ICommand>(createObject(CLSID_Command, Dictionary({
74 {"processor", vProcessor},
75 {"command", vCommand},
76 })));
77 return pCmd->execute(vParams);
78 }
79 case 2:
80 {
81 auto pCmd = createCommand(Dictionary({
82 {"processor", vProcessor},
83 {"command", vCommand},
84 {"params", vParams},
85 }));
86 return pCmd->execute();
87 }
88 case 3:
89 {
90 auto pCmd = createCommand(Dictionary({
91 {"processor", vProcessor},
92 {"command", vCommand},
93 }));
94 return pCmd->execute(vParams);
95 }
96 case 4:
97 {
98 auto pCmd = createCommand(vProcessor, vCommand);
99 return pCmd->execute(vParams);
100
101 }
102 case 5:
103 {
104 auto pCmd = createCommand(vProcessor, vCommand, vParams);
105 return pCmd->execute();
106 }
107 case 6:
108 {
109 return execCommand(vProcessor, vCommand, vParams);
110 }
111 case 7:
112 {
113 return execCommand(Dictionary({
114 {"processor", vProcessor},
115 {"command", vCommand},

Callers 1

test_command.cppFile · 0.85

Calls 4

createCommandFunction · 0.85
execCommandFunction · 0.85
DictionaryClass · 0.50
executeMethod · 0.45

Tested by

no test coverage detected