public async Task VerifyAppropriateValuesAsyncTest() { KeywordRegistration keyword = new KeywordRegistration( new Version(1, 0, 0, 0)); var lastVersion = keyword.LastUpdatedActivationKeywordModelVersion; var newVersion = new Version(lastVersion.Major, lastVersion.Minor, lastVersion.Build, lastVersion.Revision + 1); await Assert.ThrowsExceptionAsync <ArgumentException>(async() => await keyword.UpdateKeyword( keyword.KeywordDisplayName, keyword.KeywordId, keyword.KeywordModelId, keyword.KeywordActivationModelDataFormat, keyword.KeywordActivationModelFilePath, newVersion, keyword.ConfirmationKeywordModelPath), "Invalid InputValues"); }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; Task.Run(async() => await LocalSettingsHelper.InitializeAsync()).Wait(); MVARegistrationHelpers.UnlockLimitedAccessFeature(); LogRouter.Initialize(); this.keywordRegistration = new KeywordRegistration(new Version(1, 0, 0, 0)); this.agentSessionManager = new AgentSessionManager(); //var _ = this.UpdateSessionAsync(); _ = this.DoKeywordSetupAsync(); MVARegistrationHelpers.IsBackgroundTaskRegistered = true; }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; MVARegistrationHelpers.UnlockLimitedAccessFeature(); LogRouter.Initialize(); this.keywordRegistration = new KeywordRegistration( "Contoso", "{C0F1842F-D389-44D1-8420-A32A63B35568}", "1033", "MICROSOFT_KWSGRAPH_V1", "ms-appx:///MVAKeywords/Contoso.bin", new Version(1, 0, 0, 0), "ms-appx:///SDKKeywords/Contoso.table"); this.agentSessionManager = new AgentSessionManager(); //var _ = this.UpdateSessionAsync(); _ = this.DoKeywordSetupAsync(); MVARegistrationHelpers.IsBackgroundTaskRegistered = true; }
public async Task VerifyAppropriateValuesAsyncTest() { KeywordRegistration keyword = new KeywordRegistration( "Contoso", "{C0F1842F-D389-44D1-8420-A32A63B35568}", "1033", "", "ms-appx:///MVAKeywords/Contoso.bin", new Version(1, 0, 0, 0), "ms-appx:///SDKKeywords/Contoso.table"); var lastVersion = keyword.LastUpdatedActivationKeywordModelVersion; var newVersion = new Version(lastVersion.Major, lastVersion.Minor, lastVersion.Build, lastVersion.Revision + 1); await Assert.ThrowsExceptionAsync <ArgumentException>(async() => await keyword.UpdateKeyword( keyword.KeywordDisplayName, keyword.KeywordId, keyword.KeywordModelId, keyword.KeywordActivationModelDataFormat, keyword.KeywordActivationModelFilePath, newVersion, keyword.ConfirmationKeywordModelPath), "Invalid InputValues"); }