ConfigurableTestSourceFactory.h (761B)
1 // Copyright (c) Microsoft Corporation. 2 // Licensed under the MIT License. 3 #pragma once 4 #include "ISource.h" 5 #include "SourceFactory.h" 6 7 #include <string_view> 8 9 namespace AppInstaller::Repository::Microsoft 10 { 11 using namespace std::string_view_literals; 12 13 // A source for use in manual or E2E tests that can be configured to fail as needed. 14 struct ConfigurableTestSourceFactory 15 { 16 // Get the type string for this source. 17 static constexpr std::string_view Type() 18 { 19 using namespace std::string_view_literals; 20 return "Microsoft.Test.Configurable"sv; 21 } 22 23 // Creates a source factory for this type. 24 static std::unique_ptr<ISourceFactory> Create(); 25 }; 26 }