Skip to content

Commit

Permalink
tags
Browse files Browse the repository at this point in the history
tags
  • Loading branch information
lwang2016 committed Apr 26, 2016
1 parent a833aa4 commit 9d71fc2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,10 @@ public void CanCreateOrUpdateAndDeleteSavedSearches()
SearchCreateOrUpdateSavedSearchParameters parameters = new SearchCreateOrUpdateSavedSearchParameters();
parameters.Properties = new SavedSearchProperties();
parameters.Properties.Version = 1;
parameters.Properties.Query = "* | measure Count() by Type";
parameters.Properties.Query = "* | measure Count() by Computer";
parameters.Properties.DisplayName = "Create or Update Saved Search Test";
parameters.Properties.Category = " Saved Search Test Category";
parameters.Properties.Tags = new List<Tag>() { new Tag() { Name = "Group", Value = "Computer" } };

var result = client.Search.ListSavedSearches(resourceGroupName, workspaceName);

Expand All @@ -175,7 +176,9 @@ public void CanCreateOrUpdateAndDeleteSavedSearches()
if (properties.Category.Equals(parameters.Properties.Category)
&& properties.Version == parameters.Properties.Version
&& properties.Query.Equals(parameters.Properties.Query)
&& properties.DisplayName.Equals(parameters.Properties.DisplayName))
&& properties.DisplayName.Equals(parameters.Properties.DisplayName)
&& properties.Tags[0].Name.Equals(parameters.Properties.Tags[0].Name)
&& properties.Tags[0].Value.Equals(parameters.Properties.Tags[0].Value))
{
foundSavedSearch = true;
parameters.ETag = savedSearchesResult.Value[i].ETag;
Expand All @@ -185,6 +188,7 @@ public void CanCreateOrUpdateAndDeleteSavedSearches()

// Test updating a saved search
parameters.Properties.Query = "*";
parameters.Properties.Tags = new List<Tag>() { new Tag() { Name = "Source", Value = "Test2" } };
var updateSavedSearchResults = client.Search.CreateOrUpdateSavedSearch(
resourceGroupName,
workspaceName,
Expand All @@ -205,7 +209,9 @@ public void CanCreateOrUpdateAndDeleteSavedSearches()
if (properties.Category.Equals(parameters.Properties.Category)
&& properties.Version == parameters.Properties.Version
&& properties.Query.Equals(parameters.Properties.Query)
&& properties.DisplayName.Equals(parameters.Properties.DisplayName))
&& properties.DisplayName.Equals(parameters.Properties.DisplayName)
&& properties.Tags[0].Name.Equals(parameters.Properties.Tags[0].Name)
&& properties.Tags[0].Value.Equals(parameters.Properties.Tags[0].Value))
{
foundSavedSearch = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[assembly: AssemblyTitle("Microsoft Azure Operational Insights Management Library")]
[assembly: AssemblyDescription("Provides Microsoft Azure Operational Insights management operations.")]

[assembly: AssemblyVersion("0.9.0.0")]
[assembly: AssemblyVersion("0.10.0.0")]
[assembly: AssemblyFileVersion("0.13.0.0")]
[assembly: AssemblyInformationalVersion("0.13.0.0")]

Expand Down

0 comments on commit 9d71fc2

Please sign in to comment.