Skip to content

Merge dev into master for typewriter release #286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 189 commits into from
Sep 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
3fe412e
Merge pull request #181 from microsoftgraph/master
MIchaelMainer Feb 12, 2019
0dffe50
Add NamespacePrefix that's used as the class name prefix for generati…
MIchaelMainer Feb 15, 2019
1467af8
Merge pull request #182 from microsoftgraph/addObjCSetting
MIchaelMainer Feb 15, 2019
dc42529
Update README.md
MIchaelMainer Feb 26, 2019
96ef07d
Added preprocessors for nav properties
MIchaelMainer Feb 27, 2019
19d8d41
Ad additional preprocessing.
MIchaelMainer Feb 27, 2019
80a607c
Support updating the default base Graph URL via the endpointVersion a…
MIchaelMainer Mar 4, 2019
3d497a8
Merge pull request #184 from microsoftgraph/supportBetaDefaultEndpoint
MIchaelMainer Mar 5, 2019
c6a41c8
Merge pull request #183 from microsoftgraph/addedIntunePreprocessing
MIchaelMainer Mar 5, 2019
2b3921d
add rule to add containsTarget=true to labelPolicy navigation
MIchaelMainer Mar 6, 2019
16eb717
Merge pull request #185 from microsoftgraph/addPreProLabelPolicy
MIchaelMainer Mar 6, 2019
be7f1c1
Convert edm.Decimal to number
MIchaelMainer Mar 7, 2019
f958816
Merge pull request #186 from microsoftgraph/typescriptDecimal
MIchaelMainer Mar 8, 2019
092ef1f
Handle CRLF in doc annotations as code comments.
MIchaelMainer Mar 21, 2019
d1fd61e
Merge pull request #190 from microsoftgraph/fixCRLFdoc
MIchaelMainer Apr 3, 2019
545439f
Updated request builder interfaces to inherit from common interface
MIchaelMainer Apr 3, 2019
4ca1e5b
Fix for enum naming for camelcased+underscore scenario (#194)
MIchaelMainer Apr 30, 2019
3eb5335
Added preprocess rule for new intune navigation (#195)
MIchaelMainer May 1, 2019
ed77c7d
Updating EntityRequest.Base.template with code fix for response heade…
irvinesunday May 29, 2019
b6093d9
Fixed spacing indentation (#204)
irvinesunday May 30, 2019
9d03622
Fixed bugs for publishing in definitely typed repo (#203)
muthurathinam May 30, 2019
0edb485
Add contains target for new entities. (#205)
MIchaelMainer Jun 4, 2019
7744be6
Fix code comment for CreateAsync (#207)
MIchaelMainer Jun 11, 2019
9b80d86
Fix for linter issues while publishing to DefinitelyTyped
muthurathinam-m Jun 13, 2019
cb25e28
Fixed linting errors:
muthurathinam-m Jun 13, 2019
73fcf96
Adding Util.tt for types models generation
muthurathinam-m Jun 13, 2019
bd9ebaa
Adding copyright information in utils.tt file
muthurathinam-m Jun 13, 2019
5a08626
Changed Max line length for a comment
muthurathinam-m Jun 18, 2019
e3c64c1
Merge branch 'Fix-Linter-Issues-For-DefinitelyTyped' of https://githu…
muthurathinam-m Jun 18, 2019
88d94af
Merge pull request #208 from microsoftgraph/Fix-Linter-Issues-For-Def…
muthurathinam Jun 18, 2019
bd4f1f8
Add contains target for new Intune entities.
peombwa Jun 26, 2019
85d963c
Merge pull request #209 from microsoftgraph/po/IntuneAddContainsTarget
peombwa Jul 1, 2019
19af151
Adding authors for reviewing PRs in DefinitelyTyped
muthurathinam-m Jul 11, 2019
9e61d19
Merge pull request #210 from microsoftgraph/Adding-Authors-For-Defini…
muthurathinam Jul 12, 2019
29d268b
Disambiguation for base and cstor on EntityType (#217)
MIchaelMainer Aug 21, 2019
d6238c2
Init OData.Type on complex and entity types. (#219)
MIchaelMainer Oct 1, 2019
be3c6af
Adds constructor to GraphServiceClient template (#221)
andrueastman Oct 10, 2019
225cacf
Add element reorder capability (#223)
MIchaelMainer Oct 14, 2019
04c9345
Disambiguate complex type, better method overload support (#227)
MIchaelMainer Dec 3, 2019
905f10f
Support disambiguated objects for OData MethodRequestBody (#228)
MIchaelMainer Dec 4, 2019
1330e93
Support XSLT based cleaning of CSDL metadata (#232)
MIchaelMainer Jan 23, 2020
a606eff
Removed whitespace being generated by Inflector library on namespaces…
rofenton Feb 20, 2020
a5dffbf
Update README.md
MIchaelMainer Mar 24, 2020
71ecc87
Add steps for generating test .Net code files (#245)
MIchaelMainer Jun 9, 2020
958fa94
Add support for logo stream property (#247)
MIchaelMainer Jun 9, 2020
2660b6d
Fix Java generation - support methods that return enums, disambiguate…
MIchaelMainer Jun 15, 2020
f366c99
Fix import and test for Java(#252)
MIchaelMainer Jun 16, 2020
117a25a
Fix base class for PHP complex type (#255)
MIchaelMainer Jun 25, 2020
b57e4d1
Set complex type base as entity for now. (#256)
MIchaelMainer Jun 30, 2020
4dc6f2f
HB of localized readme files (#236)
OfficeGlobal Jul 2, 2020
a117848
Check whether this type is a generated model type or a PHP type (#220)
krizalys Jul 2, 2020
864f07f
Set typescript owners in template (#258)
MIchaelMainer Jul 2, 2020
d4e0fd7
Add Option type for NULL fields (#263)
Jul 28, 2020
526cf4f
Update entity_types.ts.tt (#267)
MIchaelMainer Jul 28, 2020
2d9b4e2
Add export for nullableoption<t> (#268)
MIchaelMainer Jul 29, 2020
512906f
Removing the Type Definition header from the TypeScript Template
nikithauc Aug 10, 2020
41e5050
Merge pull request #270 from microsoftgraph/TypeScript-Remove-TypeDef…
nikithauc Aug 10, 2020
be84020
- removes local version of nuget
baywet Aug 17, 2020
a341460
- switches to dotnet 4.7.2 and fixes references
baywet Aug 17, 2020
182f978
Apply suggestions from code review
baywet Aug 17, 2020
9ee8b37
- updates submodule reference
baywet Aug 18, 2020
5621a24
- updates reference to vipr
baywet Aug 19, 2020
5a74174
- updates reference
baywet Aug 19, 2020
ef6edb6
- aligns dependencies with vipr
baywet Aug 19, 2020
8448930
- updates reference
baywet Aug 19, 2020
d1583a8
- updates reference
baywet Aug 19, 2020
57a648b
- add reserved import keyword
baywet Aug 19, 2020
3a27116
- linting
baywet Aug 20, 2020
42572c0
- fixes a bug where action/methods for have a reserved name in java
baywet Aug 20, 2020
90c7dc3
- fixes a determinisic issue for java properties and methods names ca…
baywet Aug 20, 2020
7ff9b5a
Merge pull request #272 from microsoftgraph/feature/references-fix
baywet Aug 20, 2020
23a115d
Merge remote-tracking branch 'origin' into bugfix/java-import-keyword
baywet Aug 20, 2020
31c2d01
Merge pull request #274 from microsoftgraph/bugfix/java-import-keyword
baywet Aug 20, 2020
d85b845
Add pr template (#275)
MIchaelMainer Aug 20, 2020
bc73329
csharp namespaces
zengin Jun 24, 2020
09cc873
add dirty metadata with multiple namespaces
zengin Jun 25, 2020
7ed2489
TODO: disable Java fix for now to unblock namespace processing
zengin Jun 25, 2020
9ce28bc
EntityClient and EntityCollectionPage fixes
zengin Jul 1, 2020
b84dc66
fix middleware type names in request and request builder constructors
zengin Jul 1, 2020
0ecae22
added middleware type names into request methods
zengin Jul 2, 2020
3200ef1
BaseRequest in class definition
zengin Jul 2, 2020
d81974f
refactor property.class.namespace into a separate function for collec…
zengin Jul 2, 2020
582ba36
IBaseRequestBuilder and IBaseRequest
zengin Jul 2, 2020
1aac6c3
cross namespace interface names in indexers and fix in IEntityClient
zengin Jul 2, 2020
230f201
fix typo
zengin Jul 3, 2020
5c7c9a8
method request body and some additional method fixes
zengin Jul 3, 2020
3241e8d
InterfaceConverter, IBaseClient and ICollectionPage
zengin Jul 3, 2020
f756392
EnumConverter
zengin Jul 3, 2020
fafdd78
DerivedTypeConverter
zengin Jul 3, 2020
1531c52
more CollectionPages
zengin Jul 3, 2020
94b89c9
Duration
zengin Jul 3, 2020
f10abaa
Exceptions and Errors
zengin Jul 3, 2020
8f1bec7
more QueryOption and other Core type fixes
zengin Jul 3, 2020
c32d54f
cref IBaseClient
zengin Jul 3, 2020
ea793b3
add test cases
zengin Jul 8, 2020
201a9fc
add documentation
zengin Jul 8, 2020
822f361
fix function name
zengin Jul 8, 2020
2ff747a
uncomment Java disambiguation
zengin Jul 9, 2020
6a4554e
CollectionReference example and related fixes
zengin Jul 9, 2020
a68d603
add a singular navigation property as a reference
zengin Jul 10, 2020
8c10af5
add a singular reference in the subnamespace
zengin Jul 10, 2020
506d47d
stream request and method collection examples and related fixes
zengin Jul 10, 2020
347787b
add Date to Core type implementation list
zengin Jul 10, 2020
628f97f
revert changes in entity_types.ts.tt
zengin Jul 10, 2020
e83a5b9
add option type and property
zengin Jul 10, 2020
70d4efe
fix format string
zengin Jul 10, 2020
84fa17c
GetNamespace()
zengin Jul 17, 2020
11b9ceb
kill Android
zengin Jul 17, 2020
127d50c
kill Android cont'd
zengin Jul 18, 2020
2f182cb
refactor helper methods from BaseJavaModel.template.tt to TypeHelperJ…
zengin Jul 18, 2020
2a8b42b
use NamespaceName for com prefix
zengin Jul 21, 2020
499fbdb
fix namespace resolution errors
zengin Jul 21, 2020
adeec40
remove settings file for Android
zengin Jul 22, 2020
ce40180
add .csproj file
zengin Jul 22, 2020
37163b7
disambiguation for common types
zengin Jul 23, 2020
6757d72
this version compiles for TestData
zengin Jul 23, 2020
7c4020e
dedupe repeated method parameters in imports
zengin Jul 23, 2020
5e52d42
remove option.* and add fully qualified name for QueryOption
zengin Jul 23, 2020
a7378b5
remove unnecessary imports
zengin Jul 23, 2020
2bfb67f
FunctionOption fixes, generated.* is needed
zengin Jul 23, 2020
5777b65
reflect metadata changes into C# test data
zengin Jul 23, 2020
42e5a1b
refactor multiple namespaces to support multiple languages, add Java …
zengin Jul 23, 2020
8edaf50
normalize line endings
zengin Jul 24, 2020
e2136f8
rename GetMethodRequestBuilderSuperClass method
zengin Jul 24, 2020
6e013ad
clean more Androids
zengin Jul 24, 2020
0755da5
create GetPropertyNamespace()
zengin Jul 24, 2020
f843e3b
rename NamespaceName to AddPrefix
zengin Jul 24, 2020
5d78a5b
add comments
zengin Jul 24, 2020
ac55a14
Namespaces support - TypeScript (#269)
zengin Aug 5, 2020
8c6eb63
PHP Namespaces support (#271)
zengin Aug 17, 2020
0b9739a
Objective-C namespaces support (#273)
zengin Aug 21, 2020
5ddf256
apply Nikitha's changes to the test file
zengin Aug 21, 2020
ff37121
fix test runs in the same process
zengin Aug 21, 2020
c2d50fb
apply endpoint version change
zengin Aug 21, 2020
ed901f9
- fixes interface names that should contain property name
baywet Aug 21, 2020
6364e11
- update the models to reduce the import surface in generated classes
baywet Aug 21, 2020
d07281f
- adds missing processors so references stream interfaces are generat…
baywet Aug 21, 2020
c3d6f36
move to NUnit for independent test runs
zengin Aug 21, 2020
c1d461d
make all the tests NUnit and run every test in its application domain
zengin Aug 21, 2020
9763b23
apply Vincent's fixes from #274
zengin Aug 21, 2020
ad0cf48
- fixes a bug where Edm.Decimal would not be mapped properly in Java
baywet Aug 22, 2020
efacbea
- fixes a bug where java enums could have duplicated values
baywet Aug 24, 2020
ec7009c
Merge pull request #276 from microsoftgraph/zengin/feature-namespaces…
zengin Aug 24, 2020
26e07b0
- adds a distinct overloads methods to avoid generating similar overl…
baywet Aug 25, 2020
0b005bc
- adds the ability to get navigation properties from parent to avoid …
baywet Aug 25, 2020
8dfd3b2
- fixes an issue where a lot of generated java code would be missing …
baywet Aug 25, 2020
812c87b
- missing file
baywet Aug 25, 2020
7abb4d4
- fixes an issue where the client would do invalid casts
baywet Aug 25, 2020
fea4af3
- fixes an issue where naviagation properties would be missing
baywet Aug 25, 2020
03b2f74
- fixes an issues where imports would be missing
baywet Aug 25, 2020
b89733d
- fixes an issue where request and builders would generate duplicate …
baywet Aug 25, 2020
4249fc1
- adds missing imports
baywet Aug 25, 2020
2297f95
- moves utility import generation method into page class
baywet Aug 25, 2020
f6c493f
- adds missing imports in javastream requests
baywet Aug 25, 2020
ec1d627
- merges changes from namespace support
baywet Aug 26, 2020
67ba665
- minor fix for baseservice client implementation
baywet Aug 26, 2020
f38e1c8
- removes duplicate imports
baywet Aug 27, 2020
dd44933
- further deduplicates imports
baywet Aug 27, 2020
fa265f9
- switches to fully qualified references for options and no references
baywet Aug 27, 2020
cf7fa35
- makes endpoint url dynamic
baywet Aug 27, 2020
f73e84f
- adds missing navigation properties from uppermost parents
baywet Aug 27, 2020
7e289a1
- updates unit tests with new selective imports
baywet Aug 27, 2020
e6830d8
- removes extra generated files
baywet Aug 27, 2020
ba2ef67
- fixes unit test definition to point to beta so it matches
baywet Aug 27, 2020
ab7e128
Update src/GraphODataTemplateWriter/CodeHelpers/Java/TypeHelperJava.cs
baywet Aug 27, 2020
3008c68
- uses variables for namespaces for faster generation time
baywet Aug 27, 2020
7fabd80
- stacks long linq statements for readbility
baywet Aug 27, 2020
f3d3495
Merge branch 'bugfix/java-stream-properties' of https://github.com/mi…
baywet Aug 27, 2020
d4a8169
fix linting errors
zengin Aug 27, 2020
01701e3
Merge pull request #279 from microsoftgraph/zengin/lintingFixes
zengin Aug 27, 2020
46ece0c
Fixing my suggestion that broke the intended behavior
zengin Aug 28, 2020
618d04c
- version in test should be v1.0?
baywet Aug 28, 2020
824cfc5
- fixes java generation test as the endpoint contains the version and…
baywet Aug 28, 2020
b9d490f
Merge pull request #278 from microsoftgraph/bugfix/java-stream-proper…
baywet Aug 28, 2020
601e674
- adds missing skip and skipToken methods for collection requests
baywet Sep 2, 2020
cbaa9c5
- updated unit test reference files
baywet Sep 2, 2020
970c882
Merge pull request #280 from microsoftgraph/bugfix/java-missing-colle…
baywet Sep 2, 2020
49ac1cc
- fixes a bug where url options would be inserted twice for collectio…
baywet Sep 3, 2020
dae9dc5
- updates unit test files
baywet Sep 3, 2020
fdce57a
- adds missing put methods for java sdk
baywet Sep 3, 2020
61e17b2
- updates unit tests
baywet Sep 3, 2020
4ae0d37
Merge pull request #282 from microsoftgraph/bugfix/missing-put-method…
baywet Sep 3, 2020
68522f1
Merge pull request #281 from microsoftgraph/bugfix/collection-post-du…
baywet Sep 3, 2020
835c741
Supports missing request body parameter (#284)
MIchaelMainer Sep 8, 2020
5bb3e40
- fixes a bug where navigation properties of collections would not be…
baywet Sep 8, 2020
adff262
- updates unit test files
baywet Sep 8, 2020
5399f6e
Merge pull request #285 from microsoftgraph/bugfix/missing-collection…
baywet Sep 8, 2020
d965b9c
merge master
MIchaelMainer Sep 8, 2020
70d6cbf
Merge branch 'dev' of https://github.com/microsoftgraph/MSGraph-SDK-C…
MIchaelMainer Sep 8, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Summary

Give a description of what your pull request does and what platform[s] it targets. Use the *breaking changes* tag if applicable. Breaking changes can include changes to generated code files which will impact API signature or behaviors, and changes to directory structures which may impact DevOp pipelines and scripts.

## Generated code differences

Pull requests that result in changes to generated code and/or directory structures should include example diffs of the resulting changes. This makes code review much easier.

## Command line arguments to run these changes

Provide the command line arguments here so that reviewers can quickly repro the results of changes.

## Links to issues or work items this PR addresses
9 changes: 5 additions & 4 deletions .nuget/nuget.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="O365 Exchange ADO" value="https://o365exchange.pkgs.visualstudio.com/_packaging/MicrosoftGraph/nuget/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
Binary file removed .nuget/nuget.exe
Binary file not shown.
145 changes: 0 additions & 145 deletions .nuget/nuget.targets

This file was deleted.

5 changes: 0 additions & 5 deletions .nuget/packages.config

This file was deleted.

6 changes: 3 additions & 3 deletions GraphODataTemplateWriter.Test/ContainmentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void TestImplicitEntitySet()
var type = model.GetEntityTypes().Where(t => t.Name == "testEntity").First();
var prop = type.Properties.Where(p => p.Name == "testNav").First();

OdcmProperty result = OdcmModelExtensions.GetServiceCollectionNavigationPropertyForPropertyType(prop);
OdcmProperty result = OdcmModelExtensions.GetServiceCollectionNavigationPropertyForPropertyType(prop, model);
var singleton = model.GetEntityTypes().Where(t => t.Name == "testSingleton").First();
Assert.AreEqual(singleton.Name, result.Name);
}
Expand All @@ -72,7 +72,7 @@ public void TestNoValidEntitySet()
var type = model.GetEntityTypes().Where(t => t.Name == "testEntity").First();
var prop = type.Properties.Where(p => p.Name == "testInvalidNav").First(); ;

OdcmProperty result = OdcmModelExtensions.GetServiceCollectionNavigationPropertyForPropertyType(prop);
OdcmProperty result = OdcmModelExtensions.GetServiceCollectionNavigationPropertyForPropertyType(prop, model);
Assert.IsNull(result);
}

Expand All @@ -86,7 +86,7 @@ public void TestExplicitEntitySet()
var type = model.GetEntityTypes().Where(t => t.Name == "testEntity").First();
var prop = type.Properties.Where(p => p.Name == "testExplicitNav").First();

OdcmProperty result = OdcmModelExtensions.GetServiceCollectionNavigationPropertyForPropertyType(prop);
OdcmProperty result = OdcmModelExtensions.GetServiceCollectionNavigationPropertyForPropertyType(prop, model);

var entitySet = model.EntityContainer.Properties.Where(t => t.Name == "testTypes").First();
Assert.AreEqual(entitySet.Name, result.Name);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.props')" />
<Import Project="..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>GraphODataTemplateWriter.Test</RootNamespace>
<AssemblyName>GraphODataTemplateWriter.Test</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
Expand All @@ -19,6 +19,7 @@
<TestProjectType>UnitTest</TestProjectType>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -31,10 +32,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
<HintPath>..\packages\MSTest.TestFramework.1.2.1\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.1.1.18\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
<HintPath>..\packages\MSTest.TestFramework.1.2.1\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -69,8 +70,8 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.targets'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.targets'))" />
</Target>
<Import Project="..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.1.18\build\net45\MSTest.TestAdapter.targets')" />
<Import Project="..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.1.2.1\build\net45\MSTest.TestAdapter.targets')" />
</Project>
60 changes: 60 additions & 0 deletions GraphODataTemplateWriter.Test/TypeHelperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,65 @@ public void Description_Doesnt_Contain_Uncommented_NewLine_For_PHP()

Assert.AreEqual(expectedOutputString, sanitizedString, "GetSanitizedLongDescription is not handling escaped CRLF.");
}

[TestMethod]
public void Namespace_Shouldnt_Contain_Whitespace_For_CSharp()
{
var testNamespace = new OdcmNamespace("Microsoft.OutlookServices");

var namespaceName = TypeHelperCSharp.GetNamespaceName(testNamespace);

Assert.AreEqual(namespaceName, "Microsoft.OutlookServices");
}

[TestMethod]
public void Namespace_Should_PascalCase_For_CSharp()
{
var testNamespace = new OdcmNamespace("microsoft.graph");

var namespaceName = TypeHelperCSharp.GetNamespaceName(testNamespace);

Assert.AreEqual(namespaceName, "Microsoft.Graph");
}

[TestMethod]
public void PHPMainNamespace_Generated_For_V1()
{
var testNamespace = "microsoft.graph";
const string expectedPHPNamespace = "Microsoft\\Graph";

var actualPHPNamespace = TypeHelperPHP.GetPHPNamespace(testNamespace);
Assert.AreEqual(expectedPHPNamespace, actualPHPNamespace);
}

[TestMethod]
public void PHPMainNamespace_Generated_For_Beta()
{
var testNamespace = "microsoft.graph";
const string expectedPHPNamespace = "Beta\\Microsoft\\Graph";

var actualPHPNamespace = TypeHelperPHP.GetPHPNamespace(testNamespace, "Beta");
Assert.AreEqual(expectedPHPNamespace, actualPHPNamespace);
}

[TestMethod]
public void PHPSubNamespace_Generated_For_V1()
{
var testNamespace = "microsoft.graph.callRecords";
const string expectedPHPNamespace = "Microsoft\\Graph\\CallRecords";

var actualPHPNamespace = TypeHelperPHP.GetPHPNamespace(testNamespace);
Assert.AreEqual(expectedPHPNamespace, actualPHPNamespace);
}

[TestMethod]
public void PHPSubNamespace_Generated_For_Beta()
{
var testNamespace = "microsoft.graph.callRecords";
const string expectedPHPNamespace = "Beta\\Microsoft\\Graph\\CallRecords";

var actualPHPNamespace = TypeHelperPHP.GetPHPNamespace(testNamespace, "Beta");
Assert.AreEqual(expectedPHPNamespace, actualPHPNamespace);
}
}
}
4 changes: 2 additions & 2 deletions GraphODataTemplateWriter.Test/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MSTest.TestAdapter" version="1.1.18" targetFramework="net461" />
<package id="MSTest.TestFramework" version="1.1.18" targetFramework="net461" />
<package id="MSTest.TestAdapter" version="1.2.1" targetFramework="net472" />
<package id="MSTest.TestFramework" version="1.2.1" targetFramework="net472" />
</packages>
Loading