-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
…lasses
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,7 @@ obj | |
|
||
# Styles Generated Code | ||
*.scss.ts | ||
**/*.DotSettings.user | ||
**/*.DotSettings.user | ||
|
||
# JetBrains | ||
.idea |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
// <copyright file="Arrangement.cs"> | ||
// Licensed under the open source Apache License, Version 2.0. | ||
// Project: AzureLiquid.Tests | ||
// Created: 2022-10-18 07:46 | ||
// </copyright> | ||
|
||
using AzureLiquid.Tests.Resources; | ||
|
||
namespace AzureLiquid.Tests; | ||
|
||
/// <summary> | ||
/// Contains arranged values used for testing, containing mock instances and expected return values. | ||
/// </summary> | ||
public class Arrangement | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Arrangement"/> class. | ||
/// </summary> | ||
public Arrangement() | ||
{ | ||
Basic = new BasicObject("John Doe"); | ||
Deep = new TemplateFact<DeepObject> | ||
{ | ||
Content = new DeepObject("Jane Doe"), | ||
Template = "<p>{{content.nested.title}}</p>", | ||
Expected = "<p>Jane Doe</p>" | ||
}; | ||
|
||
var simple = "Simple Template"; | ||
SimpleTemplate = new TemplateFact<BasicObject> | ||
{ | ||
Content = new BasicObject(simple), | ||
Template = Templates.SimpleTemplate, | ||
Expected = Templates.SimpleResult | ||
}; | ||
|
||
Event = new TemplateFact<string> | ||
{ | ||
Content = Templates.EventContent, | ||
Template = Templates.EventTemplate, | ||
Expected = Templates.EventResult | ||
}; | ||
|
||
Albums = new TemplateFact<string> | ||
{ | ||
Content = Templates.AlbumsContent, | ||
Template = Templates.AlbumsTemplate, | ||
Expected = Templates.AlbumsResult | ||
}; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the albums fact. | ||
/// </summary> | ||
public TemplateFact<string> Albums { get; } | ||
|
||
/// <summary> | ||
/// Gets the event fact. | ||
/// </summary> | ||
public TemplateFact<string> Event { get; } | ||
|
||
/// <summary> | ||
/// Gets the simple template fact. | ||
/// </summary> | ||
public TemplateFact<BasicObject> SimpleTemplate { get; } | ||
|
||
/// <summary> | ||
/// Gets the deep object fact. | ||
/// </summary> | ||
public TemplateFact<DeepObject> Deep { get; } | ||
|
||
/// <summary> | ||
/// Gets the basic object fact. | ||
/// </summary> | ||
public BasicObject Basic { get; } | ||
|
||
} | ||
Check warning on line 77 in AzureLiquid.Tests/Arrangement.cs GitHub Actions / Publish
Check warning on line 77 in AzureLiquid.Tests/Arrangement.cs GitHub Actions / Publish
Check warning on line 77 in AzureLiquid.Tests/Arrangement.cs GitHub Actions / Publish
Check warning on line 77 in AzureLiquid.Tests/Arrangement.cs GitHub Actions / Analyze (csharp)
Check warning on line 77 in AzureLiquid.Tests/Arrangement.cs GitHub Actions / Analyze (csharp)
Check warning on line 77 in AzureLiquid.Tests/Arrangement.cs GitHub Actions / Unit Tests / Build and Test
Check warning on line 77 in AzureLiquid.Tests/Arrangement.cs GitHub Actions / Unit Tests / Build and Test
Check warning on line 77 in AzureLiquid.Tests/Arrangement.cs GitHub Actions / Unit Tests / Build and Test
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// <copyright file="BasicObject.cs"> | ||
// Licensed under the open source Apache License, Version 2.0. | ||
// Project: AzureLiquid.Tests | ||
// Created: 2022-10-18 07:46 | ||
// </copyright> | ||
|
||
namespace AzureLiquid.Tests; | ||
|
||
/// <summary> | ||
/// Basic test of an object to serialize and render. | ||
/// </summary> | ||
/// <remarks> | ||
/// Initializes a new instance of the <see cref="BasicObject"/> class. | ||
/// </remarks> | ||
/// <param name="title">The title.</param> | ||
public class BasicObject(string title) | ||
{ | ||
/// <summary> | ||
/// Gets the title. | ||
/// </summary> | ||
/// <value> | ||
/// The title. | ||
/// </value> | ||
public string Title { get; } = title; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// <copyright file="DeepObject.cs"> | ||
// Licensed under the open source Apache License, Version 2.0. | ||
// Project: AzureLiquid.Tests | ||
// Created: 2022-10-18 07:46 | ||
// </copyright> | ||
|
||
namespace AzureLiquid.Tests; | ||
|
||
/// <summary> | ||
/// Test sample for an object with nested types, ensure that deeper accessors are valid. | ||
/// </summary> | ||
/// <remarks> | ||
/// Initializes a new instance of the <see cref="DeepObject"/> class. | ||
/// </remarks> | ||
/// <param name="title">The title.</param> | ||
public class DeepObject(string title) | ||
{ | ||
/// <summary> | ||
/// Gets the nested object. | ||
/// </summary> | ||
/// <value> | ||
/// The nested object. | ||
/// </value> | ||
public BasicObject Nested { get; } = new BasicObject(title); | ||
} |
This file was deleted.