Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit a008c1b

Browse files
authored
Adding beginning baseline for command line (#28)
* Adding beginning baseline for command line * Initial testing project * Updating namespace to follow APIM team recommendation
1 parent ef91f5f commit a008c1b

File tree

11 files changed

+255
-313
lines changed

11 files changed

+255
-313
lines changed

.gitignore

Lines changed: 20 additions & 313 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
## Ignore Visual Studio temporary files, build results, and
2-
## files generated by popular Visual Studio add-ons.
3-
##
4-
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
1+
*.swp
2+
*.*~
3+
project.lock.json
4+
.DS_Store
5+
*.pyc
6+
nupkg/
7+
8+
# Visual Studio Code
9+
.vscode
10+
!.vscode/settings.json
11+
!.vscode/tasks.json
12+
!.vscode/launch.json
13+
!.vscode/extensions.json
514

615
# User-specific files
716
*.suo
817
*.user
918
*.userosscache
1019
*.sln.docstates
11-
*.DS_Store
12-
13-
# User-specific files (MonoDevelop/Xamarin Studio)
14-
*.userprefs
1520

1621
# Build results
1722
[Dd]ebug/
@@ -20,312 +25,14 @@
2025
[Rr]eleases/
2126
x64/
2227
x86/
28+
build/
2329
bld/
2430
[Bb]in/
2531
[Oo]bj/
26-
[Ll]og/
27-
28-
# Visual Studio 2015/2017 cache/options directory
29-
.vs/
30-
# Uncomment if you have tasks that create the project's static files in wwwroot
31-
#wwwroot/
32-
33-
# Visual Studio 2017 auto generated files
34-
Generated\ Files/
35-
36-
# MSTest test Results
37-
[Tt]est[Rr]esult*/
38-
[Bb]uild[Ll]og.*
39-
40-
# NUNIT
41-
*.VisualState.xml
42-
TestResult.xml
43-
44-
# Build Results of an ATL Project
45-
[Dd]ebugPS/
46-
[Rr]eleasePS/
47-
dlldata.c
48-
49-
# Benchmark Results
50-
BenchmarkDotNet.Artifacts/
51-
52-
# .NET Core
53-
project.lock.json
54-
project.fragment.lock.json
55-
artifacts/
56-
**/Properties/launchSettings.json
57-
58-
# StyleCop
59-
StyleCopReport.xml
60-
61-
# Files built by Visual Studio
62-
*_i.c
63-
*_p.c
64-
*_i.h
65-
*.ilk
66-
*.meta
67-
*.obj
68-
*.iobj
69-
*.pch
70-
*.pdb
71-
*.ipdb
72-
*.pgc
73-
*.pgd
74-
*.rsp
75-
*.sbr
76-
*.tlb
77-
*.tli
78-
*.tlh
79-
*.tmp
80-
*.tmp_proj
81-
*.log
82-
*.vspscc
83-
*.vssscc
84-
.builds
85-
*.pidb
86-
*.svclog
87-
*.scc
88-
89-
# Chutzpah Test files
90-
_Chutzpah*
91-
92-
# Visual C++ cache files
93-
ipch/
94-
*.aps
95-
*.ncb
96-
*.opendb
97-
*.opensdf
98-
*.sdf
99-
*.cachefile
100-
*.VC.db
101-
*.VC.VC.opendb
102-
103-
# Visual Studio profiler
104-
*.psess
105-
*.vsp
106-
*.vspx
107-
*.sap
108-
109-
# Visual Studio Trace Files
110-
*.e2e
111-
112-
# TFS 2012 Local Workspace
113-
$tf/
114-
115-
# Guidance Automation Toolkit
116-
*.gpState
117-
118-
# ReSharper is a .NET coding add-in
119-
_ReSharper*/
120-
*.[Rr]e[Ss]harper
121-
*.DotSettings.user
122-
123-
# JustCode is a .NET coding add-in
124-
.JustCode
125-
126-
# TeamCity is a build add-in
127-
_TeamCity*
128-
129-
# DotCover is a Code Coverage Tool
130-
*.dotCover
131-
132-
# AxoCover is a Code Coverage Tool
133-
.axoCover/*
134-
!.axoCover/settings.json
135-
136-
# Visual Studio code coverage results
137-
*.coverage
138-
*.coveragexml
139-
140-
# NCrunch
141-
_NCrunch_*
142-
.*crunch*.local.xml
143-
nCrunchTemp_*
144-
145-
# MightyMoose
146-
*.mm.*
147-
AutoTest.Net/
148-
149-
# Web workbench (sass)
150-
.sass-cache/
151-
152-
# Installshield output folder
153-
[Ee]xpress/
154-
155-
# DocProject is a documentation generator add-in
156-
DocProject/buildhelp/
157-
DocProject/Help/*.HxT
158-
DocProject/Help/*.HxC
159-
DocProject/Help/*.hhc
160-
DocProject/Help/*.hhk
161-
DocProject/Help/*.hhp
162-
DocProject/Help/Html2
163-
DocProject/Help/html
164-
165-
# Click-Once directory
166-
publish/
167-
168-
# Publish Web Output
169-
*.[Pp]ublish.xml
170-
*.azurePubxml
171-
# Note: Comment the next line if you want to checkin your web deploy settings,
172-
# but database connection strings (with potential passwords) will be unencrypted
173-
*.pubxml
174-
*.publishproj
175-
176-
# Microsoft Azure Web App publish settings. Comment the next line if you want to
177-
# checkin your Azure Web App publish settings, but sensitive information contained
178-
# in these scripts will be unencrypted
179-
PublishScripts/
180-
181-
# NuGet Packages
182-
*.nupkg
183-
# The packages folder can be ignored because of Package Restore
184-
**/[Pp]ackages/*
185-
# except build/, which is used as an MSBuild target.
186-
!**/[Pp]ackages/build/
187-
# Uncomment if necessary however generally it will be regenerated when needed
188-
#!**/[Pp]ackages/repositories.config
189-
# NuGet v3's project.json files produces more ignorable files
190-
*.nuget.props
191-
*.nuget.targets
192-
193-
# Microsoft Azure Build Output
194-
csx/
195-
*.build.csdef
196-
197-
# Microsoft Azure Emulator
198-
ecf/
199-
rcf/
200-
201-
# Windows Store app package directories and files
202-
AppPackages/
203-
BundleArtifacts/
204-
Package.StoreAssociation.xml
205-
_pkginfo.txt
206-
*.appx
207-
208-
# Visual Studio cache files
209-
# files ending in .cache can be ignored
210-
*.[Cc]ache
211-
# but keep track of directories ending in .cache
212-
!*.[Cc]ache/
213-
214-
# Others
215-
ClientBin/
216-
~$*
217-
*~
218-
*.dbmdl
219-
*.dbproj.schemaview
220-
*.jfm
221-
*.pfx
222-
*.publishsettings
223-
orleans.codegen.cs
224-
225-
# Including strong name files can present a security risk
226-
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
227-
#*.snk
228-
229-
# Since there are multiple workflows, uncomment next line to ignore bower_components
230-
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
231-
#bower_components/
232-
233-
# RIA/Silverlight projects
234-
Generated_Code/
235-
236-
# Backup & report files from converting an old project file
237-
# to a newer Visual Studio version. Backup files are not needed,
238-
# because we have git ;-)
239-
_UpgradeReport_Files/
240-
Backup*/
241-
UpgradeLog*.XML
242-
UpgradeLog*.htm
243-
ServiceFabricBackup/
244-
*.rptproj.bak
245-
246-
# SQL Server files
247-
*.mdf
248-
*.ldf
249-
*.ndf
250-
251-
# Business Intelligence projects
252-
*.rdl.data
253-
*.bim.layout
254-
*.bim_*.settings
255-
*.rptproj.rsuser
256-
257-
# Microsoft Fakes
258-
FakesAssemblies/
259-
260-
# GhostDoc plugin setting file
261-
*.GhostDoc.xml
262-
263-
# Node.js Tools for Visual Studio
264-
.ntvs_analysis.dat
265-
node_modules/
266-
267-
# Visual Studio 6 build log
268-
*.plg
269-
270-
# Visual Studio 6 workspace options file
271-
*.opt
272-
273-
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
274-
*.vbw
275-
276-
# Visual Studio LightSwitch build output
277-
**/*.HTMLClient/GeneratedArtifacts
278-
**/*.DesktopClient/GeneratedArtifacts
279-
**/*.DesktopClient/ModelManifest.xml
280-
**/*.Server/GeneratedArtifacts
281-
**/*.Server/ModelManifest.xml
282-
_Pvt_Extensions
283-
284-
# Paket dependency manager
285-
.paket/paket.exe
286-
paket-files/
287-
288-
# FAKE - F# Make
289-
.fake/
290-
291-
# JetBrains Rider
292-
.idea/
293-
*.sln.iml
294-
295-
# CodeRush
296-
.cr/
297-
298-
# Python Tools for Visual Studio (PTVS)
299-
__pycache__/
300-
*.pyc
301-
302-
# Cake - Uncomment if you are using it
303-
# tools/**
304-
# !tools/packages.config
305-
306-
# Tabs Studio
307-
*.tss
308-
309-
# Telerik's JustMock configuration file
310-
*.jmconfig
311-
312-
# BizTalk build output
313-
*.btp.cs
314-
*.btm.cs
315-
*.odx.cs
316-
*.xsd.cs
317-
318-
# OpenCover UI analysis results
319-
OpenCover/
320-
321-
# Azure Stream Analytics local run output
322-
ASALocalRun/
323-
324-
# MSBuild Binary and Structured Log
325-
*.binlog
326-
327-
# NVidia Nsight GPU debugger configuration file
328-
*.nvuser
32+
[Oo]ut/
33+
msbuild.log
34+
msbuild.err
35+
msbuild.wrn
32936

330-
# MFractors (Xamarin productivity tool) working folder
331-
.mfractor/
37+
# Visual Studio 2015
38+
.vs/
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using Xunit;
3+
using McMaster.Extensions.CommandLineUtils;
4+
5+
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates
6+
{
7+
public class CreateTests
8+
{
9+
10+
[Fact]
11+
public void ShouldFailWithUnknownCommand()
12+
{
13+
14+
var createCommand = new CreateCommand();
15+
16+
var ex = Assert.ThrowsAny<CommandParsingException>(() => createCommand.Execute("test"));
17+
//Console.WriteLine(ex.Message);
18+
Assert.Contains("Unrecognized command or argument 'test'", ex.Message);
19+
}
20+
}
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using Xunit;
3+
using McMaster.Extensions.CommandLineUtils;
4+
5+
6+
namespace Microsoft.Azure.Management.ApiManagement.ArmTemplates
7+
{
8+
public class ExtractTests
9+
{
10+
[Fact]
11+
public void ShouldFailWithUnknownCommand()
12+
{
13+
14+
var createCommand = new ExtractCommand();
15+
16+
var ex = Assert.ThrowsAny<CommandParsingException>(() => createCommand.Execute("test"));
17+
//Console.WriteLine(ex.Message);
18+
Assert.Contains("Unrecognized command or argument 'test'", ex.Message);
19+
}
20+
}
21+
}

0 commit comments

Comments
 (0)