Esempio n. 1
0
        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");
        }
Esempio n. 2
0
        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");
        }