forked from Azure/autorest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update AzureResourceSchema projects and add initial c# files
- Loading branch information
Dan Schulte
committed
Apr 6, 2016
1 parent
0522974
commit f7840bf
Showing
5 changed files
with
182 additions
and
54 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
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
65 changes: 65 additions & 0 deletions
65
...rs/AzureResourceSchema/AzureResourceSchema.Tests/AzureResourceSchemaCodeGeneratorTests.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,65 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using Microsoft.Rest.Generator.ClientModel; | ||
using System; | ||
using Xunit; | ||
|
||
namespace Microsoft.Rest.Generator.AzureResourceSchema.Tests | ||
{ | ||
[Collection("AutoRest Tests")] | ||
public class AzureResourceSchemaCodeGeneratorTests | ||
{ | ||
[Fact] | ||
public void DescriptionThrowsException() | ||
{ | ||
Settings settings = new Settings(); | ||
AzureResourceSchemaCodeGenerator codeGen = new AzureResourceSchemaCodeGenerator(settings); | ||
Assert.Throws<NotImplementedException>(() => { string value = codeGen.Description; }); | ||
} | ||
|
||
[Fact] | ||
public void ImplementationFileExtensionThrowsException() | ||
{ | ||
Settings settings = new Settings(); | ||
AzureResourceSchemaCodeGenerator codeGen = new AzureResourceSchemaCodeGenerator(settings); | ||
Assert.Throws<NotImplementedException>(() => { string value = codeGen.ImplementationFileExtension; }); | ||
} | ||
|
||
[Fact] | ||
public void NameThrowsException() | ||
{ | ||
Settings settings = new Settings(); | ||
AzureResourceSchemaCodeGenerator codeGen = new AzureResourceSchemaCodeGenerator(settings); | ||
Assert.Throws<NotImplementedException>(() => { string value = codeGen.Name; }); | ||
} | ||
|
||
[Fact] | ||
public void UsageInstructionsThrowsException() | ||
{ | ||
Settings settings = new Settings(); | ||
AzureResourceSchemaCodeGenerator codeGen = new AzureResourceSchemaCodeGenerator(settings); | ||
Assert.Throws<NotImplementedException>(() => { string value = codeGen.UsageInstructions; }); | ||
} | ||
|
||
[Fact] | ||
public void GenerateThrowsException() | ||
{ | ||
Settings settings = new Settings(); | ||
AzureResourceSchemaCodeGenerator codeGen = new AzureResourceSchemaCodeGenerator(settings); | ||
|
||
ServiceClient serviceClient = new ServiceClient(); | ||
Assert.Throws<NotImplementedException>(() => { codeGen.Generate(serviceClient); }); | ||
} | ||
|
||
[Fact] | ||
public void NormalizeClientModelThrowsException() | ||
{ | ||
Settings settings = new Settings(); | ||
AzureResourceSchemaCodeGenerator codeGen = new AzureResourceSchemaCodeGenerator(settings); | ||
|
||
ServiceClient serviceClient = new ServiceClient(); | ||
Assert.Throws<NotImplementedException>(() => { codeGen.NormalizeClientModel(serviceClient); }); | ||
} | ||
} | ||
} |
57 changes: 26 additions & 31 deletions
57
...ors/AzureResourceSchema/AzureResourceSchema/AutoRest.Generator.AzureResourceSchema.csproj
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 |
---|---|---|
@@ -1,53 +1,48 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\..\..\</SolutionDir> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<LibraryFxTarget Condition="'$(LibraryFxTarget)' == ''">net45</LibraryFxTarget> | ||
<ProjectGuid>{654344A5-0556-49C7-BFB3-59676D7440D3}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>Microsoft.Rest.Generator.AzureResourceSchema</RootNamespace> | ||
<AssemblyName>AutoRest.Generator.AzureResourceSchema</AssemblyName> | ||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Net45-Debug</Configuration> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Import Project="$(SolutionDir)\Tools\AutoRest.Settings.targets" /> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Net45-Debug|AnyCPU' "> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<OutputPath>bin\Net45-Debug</OutputPath> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="AzureResourceSchemaCodeGenerator.cs" /> | ||
<Compile Include="$(SolutionDir)\Tools\AssemblyVersionInfo.cs"> | ||
<Link>Properties\AssemblyVersionInfo.cs</Link> | ||
</Compile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\AutoRest.Core\AutoRest.Core.csproj"> | ||
<Project>{c876085f-9dc3-41f0-b7b4-17022cd84684}</Project> | ||
<Name>AutoRest.Core</Name> | ||
</ProjectReference> | ||
<ProjectReference Include="..\..\Extensions\Extensions\AutoRest.Generator.Extensions.csproj"> | ||
<Project>{7dd043eb-5e53-4180-b123-cc3cc5022e34}</Project> | ||
<Name>AutoRest.Generator.Extensions</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<CodeAnalysisDictionary Include="$(SolutionDir)\Tools\CustomDictionary.xml"> | ||
<Link>CustomDictionary.xml</Link> | ||
</CodeAnalysisDictionary> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
59 changes: 59 additions & 0 deletions
59
...st/Generators/AzureResourceSchema/AzureResourceSchema/AzureResourceSchemaCodeGenerator.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,59 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Threading.Tasks; | ||
using Microsoft.Rest.Generator.ClientModel; | ||
|
||
namespace Microsoft.Rest.Generator.AzureResourceSchema | ||
{ | ||
public class AzureResourceSchemaCodeGenerator : CodeGenerator | ||
{ | ||
public AzureResourceSchemaCodeGenerator(Settings settings) | ||
: base(settings) | ||
{ | ||
} | ||
|
||
public override string Description | ||
{ | ||
get | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
|
||
public override string ImplementationFileExtension | ||
{ | ||
get | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
|
||
public override string Name | ||
{ | ||
get | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
|
||
public override string UsageInstructions | ||
{ | ||
get | ||
{ | ||
return "MOCK USAGE INSTRUCTIONS"; | ||
} | ||
} | ||
|
||
public override Task Generate(ServiceClient serviceClient) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public override void NormalizeClientModel(ServiceClient serviceClient) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
} | ||
} |