();
+ }
+
+ public class NameDetails
+ {
+ public string Firstname { get; set; }
+ public string Surname { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/test/FluentEmail.Liquid.Tests/ComplexModel/TestData.cs b/test/FluentEmail.Liquid.Tests/ComplexModel/TestData.cs
new file mode 100644
index 00000000..e1dd598c
--- /dev/null
+++ b/test/FluentEmail.Liquid.Tests/ComplexModel/TestData.cs
@@ -0,0 +1,9 @@
+namespace FluentEmail.Liquid.Tests
+{
+ public static class TestData
+ {
+ public const string ToEmail = "bob@test.com";
+ public const string FromEmail = "johno@test.com";
+ public const string Subject = "sup dawg";
+ }
+}
\ No newline at end of file
diff --git a/test/FluentEmail.Liquid.Tests/FluentEmail.Liquid.Tests.csproj b/test/FluentEmail.Liquid.Tests/FluentEmail.Liquid.Tests.csproj
index e2363f10..e2c5dcfc 100644
--- a/test/FluentEmail.Liquid.Tests/FluentEmail.Liquid.Tests.csproj
+++ b/test/FluentEmail.Liquid.Tests/FluentEmail.Liquid.Tests.csproj
@@ -21,6 +21,7 @@
+
diff --git a/test/FluentEmail.Liquid.Tests/LiquidTests.cs b/test/FluentEmail.Liquid.Tests/LiquidTests.cs
index 368e20e0..2d53e3b9 100644
--- a/test/FluentEmail.Liquid.Tests/LiquidTests.cs
+++ b/test/FluentEmail.Liquid.Tests/LiquidTests.cs
@@ -22,7 +22,7 @@ public class LiquidTests
public void SetUp()
{
// default to have no file provider, only required when layout files are in use
- SetupRenderer(null);
+ SetupRenderer();
}
private static void SetupRenderer(
@@ -51,7 +51,6 @@ public void Model_With_List_Template_Matches()
Assert.AreEqual("sup LUKE here is a list 123", email.Data.Body);
}
-
[Test]
public void Custom_Context_Values()
{
@@ -155,8 +154,7 @@ public void Should_be_able_to_use_project_layout()
{
SetupRenderer(new PhysicalFileProvider(Path.Combine(new FileInfo(Assembly.GetExecutingAssembly().Location).Directory!.FullName, "EmailTemplates")));
- const string template = @"
-{% layout '_layout.liquid' %}
+ const string template = @"{% layout '_layout.liquid' %}
sup {{ Name }} here is a list {% for i in Numbers %}{{ i }}{% endfor %}";
var email = new Email(FromEmail)
@@ -167,14 +165,12 @@ public void Should_be_able_to_use_project_layout()
Assert.AreEqual($"Hello!
{Environment.NewLine}{Environment.NewLine}sup LUKE here is a list 123
", email.Data.Body);
}
-
[Test]
public void Should_be_able_to_use_embedded_layout()
{
SetupRenderer(new EmbeddedFileProvider(typeof(LiquidTests).Assembly, "FluentEmail.Liquid.Tests.EmailTemplates"));
- const string template = @"
-{% layout '_embedded.liquid' %}
+ const string template = @"{% layout '_embedded.liquid' %}
sup {{ Name }} here is a list {% for i in Numbers %}{{ i }}{% endfor %}";
var email = new Email(FromEmail)