TestGroupSettingsResult.cpp (1788B)
1 // Copyright (c) Microsoft Corporation. 2 // Licensed under the MIT License. 3 #include "pch.h" 4 #include "TestGroupSettingsResult.h" 5 #include "TestConfigurationSetResult.h" 6 7 namespace winrt::Microsoft::Management::Configuration::implementation 8 { 9 TestGroupSettingsResult::TestGroupSettingsResult() : 10 m_resultInformation(make_self<wil::details::module_count_wrapper<implementation::ConfigurationUnitResultInformation>>()), 11 m_unitResults(winrt::multi_threaded_vector<ITestSettingsResult>()) 12 {} 13 14 void TestGroupSettingsResult::Group(const Windows::Foundation::IInspectable& value) 15 { 16 m_group = value; 17 } 18 19 void TestGroupSettingsResult::TestResult(ConfigurationTestResult value) 20 { 21 m_testResult = value; 22 } 23 24 TestGroupSettingsResult::ResultInformationPtr TestGroupSettingsResult::ResultInformationInternal() 25 { 26 return m_resultInformation; 27 } 28 29 void TestGroupSettingsResult::AppendUnitResult(const ITestSettingsResult& value) 30 { 31 m_unitResults.Append(value); 32 33 // Also aggregate the result of this incoming test into the overall result 34 m_testResult = TestConfigurationSetResult::FoldInTestResult(m_testResult, value.TestResult()); 35 } 36 37 Windows::Foundation::IInspectable TestGroupSettingsResult::Group() 38 { 39 return m_group; 40 } 41 42 ConfigurationTestResult TestGroupSettingsResult::TestResult() 43 { 44 return m_testResult; 45 } 46 47 IConfigurationUnitResultInformation TestGroupSettingsResult::ResultInformation() 48 { 49 return *m_resultInformation; 50 } 51 52 Windows::Foundation::Collections::IVector<ITestSettingsResult> TestGroupSettingsResult::UnitResults() 53 { 54 return m_unitResults; 55 } 56 }