Skip to content

Commit

Permalink
Tests and examples updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ky-one committed Feb 9, 2021
1 parent 2c3ca63 commit 6e7364d
Show file tree
Hide file tree
Showing 24 changed files with 105 additions and 42 deletions.
4 changes: 2 additions & 2 deletions Examples/Angular/ModelFromAssembly/ModelFromAssembly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="KY.Generator" Version="6.5.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.5.0" />
<PackageReference Include="KY.Generator" Version="6.6.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.6.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Examples/Angular/ModelFromAssembly/Output/another-type.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated with KY.Generator 6.5.0.0
// This code was generated with KY.Generator 6.6.0.0
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
Expand Down
2 changes: 1 addition & 1 deletion Examples/Angular/ModelFromAssembly/Output/type-to-read.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated with KY.Generator 6.5.0.0
// This code was generated with KY.Generator 6.6.0.0
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated with KY.Generator 6.5.0.0
// This code was generated with KY.Generator 6.6.0.0
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated with KY.Generator 6.5.0.0
// This code was generated with KY.Generator 6.6.0.0
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="KY.Generator" Version="6.5.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.5.0" />
<PackageReference Include="KY.Generator" Version="6.6.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.6.0" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.7" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated with KY.Generator 6.5.0.0
// This code was generated with KY.Generator 6.6.0.0
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated with KY.Generator 6.5.0.0
// This code was generated with KY.Generator 6.6.0.0
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated with KY.Generator 6.5.0.0
// This code was generated with KY.Generator 6.6.0.0
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="KY.Generator" Version="6.5.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.5.0" />
<PackageReference Include="KY.Generator" Version="6.6.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.6.0" />
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.7" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="KY.Generator" Version="6.5.0" />
<PackageReference Include="KY.Generator.Angular" Version="6.5.0" />
<PackageReference Include="KY.Generator.AspDotNet" Version="6.5.0" />
<PackageReference Include="KY.Generator.Fluent" Version="6.5.0" />
<PackageReference Include="KY.Generator.Reflection" Version="6.5.0" />
<PackageReference Include="KY.Generator" Version="6.6.0" />
<PackageReference Include="KY.Generator.Angular" Version="6.6.0" />
<PackageReference Include="KY.Generator.AspDotNet" Version="6.6.0" />
<PackageReference Include="KY.Generator.Fluent" Version="6.6.0" />
<PackageReference Include="KY.Generator.Reflection" Version="6.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated with KY.Generator 6.5.0.0
// This code was generated with KY.Generator 6.6.0.0
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated with KY.Generator 6.5.0.0
// This code was generated with KY.Generator 6.6.0.0
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="KY.Generator" Version="6.5.0" />
<PackageReference Include="KY.Generator.Angular" Version="6.5.0" />
<PackageReference Include="KY.Generator.Fluent" Version="6.5.0" />
<PackageReference Include="KY.Generator.Reflection" Version="6.5.0" />
<PackageReference Include="KY.Generator" Version="6.6.0" />
<PackageReference Include="KY.Generator.Angular" Version="6.6.0" />
<PackageReference Include="KY.Generator.Fluent" Version="6.6.0" />
<PackageReference Include="KY.Generator.Reflection" Version="6.6.0" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="5.0.1" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions Tests/AnnotationAsync/AnnotationAsync.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="KY.Generator" Version="6.5.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.5.0" />
<PackageReference Include="KY.Generator" Version="6.6.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Tests/AnnotationAsyncAssembly/AnnotationAsyncAssembly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="KY.Generator" Version="6.5.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.5.0" />
<PackageReference Include="KY.Generator" Version="6.6.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.6.0" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions Tests/AnnotationInNestedClass/AnnotationInNestedClass.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="KY.Generator" Version="6.5.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.5.0" />
<PackageReference Include="KY.Generator" Version="6.6.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.6.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="KY.Generator" Version="6.5.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.5.0" />
<PackageReference Include="KY.Generator" Version="6.6.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.6.0" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions Tests/Fluent/Fluent.Generator/Fluent.Generator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="KY.Generator" Version="6.5.0" />
<PackageReference Include="KY.Generator.Angular" Version="6.5.0" />
<PackageReference Include="KY.Generator.Fluent" Version="6.5.0" />
<PackageReference Include="KY.Generator.Reflection" Version="6.5.0" />
<PackageReference Include="KY.Generator" Version="6.6.0" />
<PackageReference Include="KY.Generator.Angular" Version="6.6.0" />
<PackageReference Include="KY.Generator.Fluent" Version="6.6.0" />
<PackageReference Include="KY.Generator.Reflection" Version="6.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Tests/Types/Types.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="KY.Generator" Version="6.5.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.5.0" />
<PackageReference Include="KY.Generator" Version="6.6.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.6.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/* eslint-disable */
// tslint:disable

import { HttpClient } from "@angular/common/http";
import { Injectable } from "@angular/core";
import { Observable } from "rxjs";
import { Subject } from "rxjs";

@Injectable({
providedIn: "root"
})
export class EdgeCasesService {
private readonly http: HttpClient;
public serviceUrl: string = "";

public constructor(http: HttpClient) {
this.http = http;
}

public get(subject: string, httpOptions: {} = undefined): Observable<void> {
let rxjsSubject = new Subject<void>();
this.http.get<void>(this.serviceUrl + "/edgecases" + "?subject=" + this.convertAny(subject), httpOptions).subscribe(() => {
rxjsSubject.next();
rxjsSubject.complete();
}, (error) => rxjsSubject.error(error));
return rxjsSubject;
}

public post(subject: string, httpOptions: {} = undefined): Observable<void> {
let rxjsSubject = new Subject<void>();
this.http.post<void>(this.serviceUrl + "/edgecases" + "?subject=" + this.convertAny(subject), httpOptions).subscribe(() => {
rxjsSubject.next();
rxjsSubject.complete();
}, (error) => rxjsSubject.error(error));
return rxjsSubject;
}

public convertAny(value: any): string {
return value === null || value === undefined ? "" : value.toString();
}
}

// outputid:627408ca-a818-4326-b843-415f5bbfb028
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class RoutedService {
return subject;
}

public test5(test: number, httpOptions: {} = undefined): Observable<void> {
public getTest5(test: number, httpOptions: {} = undefined): Observable<void> {
let subject = new Subject<void>();
this.http.get<void>(this.serviceUrl + "/routed/test5/" + test, httpOptions).subscribe(() => {
subject.next();
Expand All @@ -99,7 +99,7 @@ export class RoutedService {
return subject;
}

public test52(test: number, httpOptions: {} = undefined): Observable<void> {
public postTest5(test: number, httpOptions: {} = undefined): Observable<void> {
let subject = new Subject<void>();
this.http.post<void>(this.serviceUrl + "/routed/test5/" + test, httpOptions).subscribe(() => {
subject.next();
Expand Down
20 changes: 20 additions & 0 deletions Tests/WebApiController/Controllers/EdgeCasesController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using KY.Generator;
using Microsoft.AspNetCore.Mvc;

namespace WebApiController.Controllers
{
[ApiController]
[Route("[controller]")]
[GenerateAngularService("ClientApp/src/app/edge-cases/services", "ClientApp/src/app/edge-cases/models")]
[GenerateOption(GenerateOption.SkipHeader)]
public class EdgeCasesController : ControllerBase
{
[HttpGet]
public void Get(string subject)
{ }

[HttpPost]
public void Post(string subject)
{ }
}
}
4 changes: 2 additions & 2 deletions Tests/WebApiController/WebApiController.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

<ItemGroup>
<PackageReference Include="KY.Core.Common" Version="4.14.0" />
<PackageReference Include="KY.Generator" Version="6.5.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.5.0" />
<PackageReference Include="KY.Generator" Version="6.6.0" />
<PackageReference Include="KY.Generator.Annotations" Version="6.6.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="4.1.1" />
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.7" />
</ItemGroup>
Expand Down

0 comments on commit 6e7364d

Please sign in to comment.