forked from Azure/azure-sdk-for-net
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'AutoRest' of https://github.com/Azure/azure-sdk-for-net …
…into Rename
- Loading branch information
Showing
457 changed files
with
89,142 additions
and
4,130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/ResourceManagement/CustomerInsights/CustomerInsights.Tests/CustomerInsights.Tests.xproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion> | ||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | ||
</PropertyGroup> | ||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" /> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>1928bb6e-0a9c-4b90-9a3c-92cc12625e4c</ProjectGuid> | ||
<RootNamespace>CustomerInsights.Tests</RootNamespace> | ||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath> | ||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
</ItemGroup> | ||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" /> | ||
</Project> |
146 changes: 146 additions & 0 deletions
146
src/ResourceManagement/CustomerInsights/CustomerInsights.Tests/Helpers.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
namespace CustomerInsights.Tests | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using Microsoft.Azure.Management.CustomerInsights.Models; | ||
|
||
public class Helpers | ||
{ | ||
public static ProfileResourceFormat GetTestProfile(string profileName) | ||
{ | ||
return new ProfileResourceFormat | ||
{ | ||
ApiEntitySetName = profileName, | ||
Fields = | ||
new[] | ||
{ | ||
new PropertyDefinition | ||
{ | ||
FieldName = "Id", | ||
FieldType = "Edm.String", | ||
IsArray = false, | ||
IsRequired = true | ||
}, | ||
new PropertyDefinition | ||
{ | ||
FieldName = "ProfileId", | ||
FieldType = "Edm.String", | ||
IsArray = false, | ||
IsRequired = true | ||
}, | ||
new PropertyDefinition | ||
{ | ||
FieldName = "LastName", | ||
FieldType = "Edm.String", | ||
IsArray = false, | ||
IsRequired = true | ||
}, | ||
new PropertyDefinition | ||
{ | ||
FieldName = profileName, | ||
FieldType = "Edm.String", | ||
IsArray = false, | ||
IsRequired = true | ||
}, | ||
new PropertyDefinition | ||
{ | ||
FieldName = "SavingAccountBalance", | ||
FieldType = "Edm.Int32", | ||
IsArray = false, | ||
IsRequired = true | ||
} | ||
}, | ||
StrongIds = | ||
new List<StrongId> | ||
{ | ||
new StrongId | ||
{ | ||
StrongIdName = "Id", | ||
Description = null, | ||
DisplayName = null, | ||
KeyPropertyNames = new List<string> { "Id", "SavingAccountBalance" } | ||
}, | ||
new StrongId | ||
{ | ||
StrongIdName = "ProfileId", | ||
Description = null, | ||
DisplayName = null, | ||
KeyPropertyNames = new List<string> { "ProfileId", "LastName" } | ||
} | ||
}, | ||
DisplayName = null, | ||
Description = null, | ||
Attributes = null, | ||
SchemaItemTypeLink = "SchemaItemTypeLink", | ||
LocalizedAttributes = null, | ||
SmallImage = "\\Images\\smallImage", | ||
MediumImage = "\\Images\\MediumImage", | ||
LargeImage = "\\Images\\LargeImage" | ||
}; | ||
} | ||
|
||
public static InteractionResourceFormat GetTestInteraction(string interactionName, string profileName) | ||
{ | ||
return new InteractionResourceFormat | ||
{ | ||
ApiEntitySetName = interactionName, | ||
PrimaryParticipantProfilePropertyName = profileName, | ||
IdPropertyNames = new[] { interactionName }, | ||
Fields = | ||
new[] | ||
{ | ||
new PropertyDefinition | ||
{ | ||
FieldName = interactionName, | ||
FieldType = "Edm.String", | ||
IsArray = false, | ||
IsRequired = true | ||
}, | ||
new PropertyDefinition { FieldName = profileName, FieldType = "Edm.String" } | ||
}, | ||
SmallImage = "\\Images\\smallImage", | ||
MediumImage = "\\Images\\MediumImage", | ||
LargeImage = "\\Images\\LargeImage" | ||
}; | ||
} | ||
|
||
public static ConnectorResourceFormat GetTestConnector(string connectorName, string description) | ||
{ | ||
return new ConnectorResourceFormat | ||
{ | ||
DisplayName = connectorName, | ||
Description = description, | ||
ConnectorType = ConnectorTypes.AzureBlob, | ||
ConnectorProperties = | ||
new Dictionary<string, object> | ||
{ | ||
{ | ||
"connectionKeyVaultUrl", | ||
$"vault=off;DefaultEndpointsProtocol=https;AccountName=XXX;AccountKey=XXX" | ||
} | ||
} | ||
}; | ||
} | ||
|
||
public static RoleAssignmentResourceFormat GetTestRoleAssignment(RoleTypes roleType, int principalCount) | ||
{ | ||
var roleAssignment = new RoleAssignmentResourceFormat | ||
{ | ||
Role = roleType, | ||
Principals = new List<AssignmentPrincipal>() | ||
}; | ||
|
||
for (var i = 0; i < principalCount; ++i) | ||
{ | ||
roleAssignment.Principals.Add( | ||
new AssignmentPrincipal { PrincipalType = "User", PrincipalId = Guid.NewGuid().ToString("N") }); | ||
} | ||
|
||
return roleAssignment; | ||
} | ||
|
||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
src/ResourceManagement/CustomerInsights/CustomerInsights.Tests/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("CustomerInsights.Tests")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Microsoft Corporation")] | ||
[assembly: AssemblyProduct("CustomerInsights.Tests")] | ||
[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("9f5b66c3-1bda-4c49-80b6-592247201188")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] | ||
|
147 changes: 147 additions & 0 deletions
147
...sights.Tests.Tests.AuthorizationPolicyScenarioTests/CreateAndReadAuthorizationPolicy.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
{ | ||
"Entries": [ | ||
{ | ||
"RequestUri": "/subscriptions/c909e979-ef71-4def-a970-bc7c154db8c5/resourceGroups/TestHubRG/providers/Microsoft.CustomerInsights/hubs/sdktestbn3/authorizationPolicies/testPolicy5967?api-version=2017-01-01", | ||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzkwOWU5NzktZWY3MS00ZGVmLWE5NzAtYmM3YzE1NGRiOGM1L3Jlc291cmNlR3JvdXBzL1Rlc3RIdWJSRy9wcm92aWRlcnMvTWljcm9zb2Z0LkN1c3RvbWVySW5zaWdodHMvaHVicy9zZGt0ZXN0Ym4zL2F1dGhvcml6YXRpb25Qb2xpY2llcy90ZXN0UG9saWN5NTk2Nz9hcGktdmVyc2lvbj0yMDE3LTAxLTAx", | ||
"RequestMethod": "PUT", | ||
"RequestBody": "{\r\n \"properties\": {\r\n \"permissions\": [\r\n \"Read\",\r\n \"Write\",\r\n \"Manage\"\r\n ],\r\n \"primaryKey\": \"cHJpbWFyeVRlc3RSZWFk\",\r\n \"secondaryKey\": \"c2Vjb25kYXJ5VGVzdFJlYWQ=\"\r\n }\r\n}", | ||
"RequestHeaders": { | ||
"Content-Type": [ | ||
"application/json; charset=utf-8" | ||
], | ||
"Content-Length": [ | ||
"196" | ||
], | ||
"x-ms-client-request-id": [ | ||
"e5064317-a5fe-48f8-a5de-4fb63dd2b224" | ||
], | ||
"accept-language": [ | ||
"en-US" | ||
], | ||
"User-Agent": [ | ||
"FxVersion/4.6.24410.01", | ||
"Microsoft.Azure.Management.CustomerInsights.CustomerInsightsManagementClient/0.0.1-preview" | ||
] | ||
}, | ||
"ResponseBody": "{\r\n \"id\": \"/subscriptions/c909e979-ef71-4def-a970-bc7c154db8c5/resourceGroups/TestHubRG/providers/Microsoft.CustomerInsights/hubs/sdktestbn3/AuthorizationPolicies/testPolicy5967\",\r\n \"name\": \"sdktestbn3/testPolicy5967\",\r\n \"properties\": {\r\n \"permissions\": [\r\n \"Read\",\r\n \"Write\",\r\n \"Manage\"\r\n ],\r\n \"policyName\": \"testPolicy5967\",\r\n \"primaryKey\": \"cHJpbWFyeVRlc3RSZWFk\",\r\n \"secondaryKey\": \"c2Vjb25kYXJ5VGVzdFJlYWQ=\"\r\n },\r\n \"type\": \"Microsoft.CustomerInsights/hubs/AuthorizationPolicies\"\r\n}", | ||
"ResponseHeaders": { | ||
"Content-Length": [ | ||
"436" | ||
], | ||
"Content-Type": [ | ||
"application/json" | ||
], | ||
"Expires": [ | ||
"-1" | ||
], | ||
"Cache-Control": [ | ||
"no-cache" | ||
], | ||
"Date": [ | ||
"Tue, 31 Jan 2017 19:57:10 GMT" | ||
], | ||
"Pragma": [ | ||
"no-cache" | ||
], | ||
"Server": [ | ||
"Microsoft-HTTPAPI/2.0", | ||
"Microsoft-HTTPAPI/2.0" | ||
], | ||
"x-ms-ratelimit-remaining-subscription-writes": [ | ||
"1199" | ||
], | ||
"Strict-Transport-Security": [ | ||
"max-age=31536000; includeSubDomains" | ||
], | ||
"x-ms-request-id": [ | ||
"6a73bbf4-83d4-4a50-a344-697032e7e20f", | ||
"b7ee5b41-a074-40cc-9b49-8b60c5f95a8f" | ||
], | ||
"OData-Version": [ | ||
"4.0" | ||
], | ||
"x-ms-correlation-request-id": [ | ||
"fe9a31d5-4294-421e-89e3-e598bdc0bf06" | ||
], | ||
"x-ms-routing-request-id": [ | ||
"CENTRALUS:20170131T195711Z:fe9a31d5-4294-421e-89e3-e598bdc0bf06" | ||
] | ||
}, | ||
"StatusCode": 201 | ||
}, | ||
{ | ||
"RequestUri": "/subscriptions/c909e979-ef71-4def-a970-bc7c154db8c5/resourceGroups/TestHubRG/providers/Microsoft.CustomerInsights/hubs/sdktestbn3/authorizationPolicies/testPolicy5967?api-version=2017-01-01", | ||
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzkwOWU5NzktZWY3MS00ZGVmLWE5NzAtYmM3YzE1NGRiOGM1L3Jlc291cmNlR3JvdXBzL1Rlc3RIdWJSRy9wcm92aWRlcnMvTWljcm9zb2Z0LkN1c3RvbWVySW5zaWdodHMvaHVicy9zZGt0ZXN0Ym4zL2F1dGhvcml6YXRpb25Qb2xpY2llcy90ZXN0UG9saWN5NTk2Nz9hcGktdmVyc2lvbj0yMDE3LTAxLTAx", | ||
"RequestMethod": "GET", | ||
"RequestBody": "", | ||
"RequestHeaders": { | ||
"x-ms-client-request-id": [ | ||
"6e092682-eb29-43f2-aec3-c7593701b4ad" | ||
], | ||
"accept-language": [ | ||
"en-US" | ||
], | ||
"User-Agent": [ | ||
"FxVersion/4.6.24410.01", | ||
"Microsoft.Azure.Management.CustomerInsights.CustomerInsightsManagementClient/0.0.1-preview" | ||
] | ||
}, | ||
"ResponseBody": "{\r\n \"id\": \"/subscriptions/c909e979-ef71-4def-a970-bc7c154db8c5/resourceGroups/TestHubRG/providers/Microsoft.CustomerInsights/hubs/sdktestbn3/AuthorizationPolicies/testPolicy5967\",\r\n \"name\": \"sdktestbn3/testPolicy5967\",\r\n \"properties\": {\r\n \"permissions\": [\r\n \"Read\",\r\n \"Write\",\r\n \"Manage\"\r\n ],\r\n \"policyName\": \"testPolicy5967\",\r\n \"primaryKey\": \"cHJpbWFyeVRlc3RSZWFk\",\r\n \"secondaryKey\": \"c2Vjb25kYXJ5VGVzdFJlYWQ=\"\r\n },\r\n \"type\": \"Microsoft.CustomerInsights/hubs/AuthorizationPolicies\"\r\n}", | ||
"ResponseHeaders": { | ||
"Content-Type": [ | ||
"application/json" | ||
], | ||
"Expires": [ | ||
"-1" | ||
], | ||
"Cache-Control": [ | ||
"no-cache" | ||
], | ||
"Date": [ | ||
"Tue, 31 Jan 2017 19:57:47 GMT" | ||
], | ||
"Pragma": [ | ||
"no-cache" | ||
], | ||
"Transfer-Encoding": [ | ||
"chunked" | ||
], | ||
"Server": [ | ||
"Microsoft-HTTPAPI/2.0", | ||
"Microsoft-HTTPAPI/2.0" | ||
], | ||
"Vary": [ | ||
"Accept-Encoding" | ||
], | ||
"x-ms-ratelimit-remaining-subscription-reads": [ | ||
"14950" | ||
], | ||
"Strict-Transport-Security": [ | ||
"max-age=31536000; includeSubDomains" | ||
], | ||
"x-ms-request-id": [ | ||
"2ccc360e-4771-4d08-a87e-623c50e4856f", | ||
"ec786b6f-563c-461c-b2b6-d382df447ba0" | ||
], | ||
"OData-Version": [ | ||
"4.0" | ||
], | ||
"x-ms-correlation-request-id": [ | ||
"5194f52b-fb7a-4c2f-820d-51f8f0422bd4" | ||
], | ||
"x-ms-routing-request-id": [ | ||
"CENTRALUS:20170131T195748Z:5194f52b-fb7a-4c2f-820d-51f8f0422bd4" | ||
] | ||
}, | ||
"StatusCode": 200 | ||
} | ||
], | ||
"Names": { | ||
"CreateAndReadAuthorizationPolicy": [ | ||
"testPolicy5967" | ||
] | ||
}, | ||
"Variables": { | ||
"SubscriptionId": "c909e979-ef71-4def-a970-bc7c154db8c5" | ||
} | ||
} |
Oops, something went wrong.