Skip to content
This repository was archived by the owner on Apr 13, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Rename this file to .env to run tests locally
FRENDS_SECRET_KEY="example"
Comment thread
MatteoDelOmbra marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556"/>
<PackageReference Include="coverlet.collector" Version="6.*"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.*"/>
<PackageReference Include="NUnit" Version="4.*"/>
<PackageReference Include="NUnit3TestAdapter" Version="6.*" />
<PackageReference Include="NUnit3TestAdapter" Version="6.*"/>
<PackageReference Include="dotenv.net" Version="4.*"/>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using System.Threading;
using Frends.Echo.Execute.Definitions;
using NUnit.Framework;

namespace Frends.Echo.Execute.Tests;

[TestFixture]
public class IntegrationTests : TestBase
Comment thread
MatteoDelOmbra marked this conversation as resolved.
Outdated
{
[Test]
public void TestEnvironmentVariables()
Comment thread
MatteoDelOmbra marked this conversation as resolved.
Outdated
{
Assert.That(SecretKey, Is.EqualTo("example"), SecretKey);
}
Comment thread
MatteoDelOmbra marked this conversation as resolved.
Outdated

[Test]
public void ShouldRepeatContentWithDelimiter()
{
var input = new Input
{
Content = "foobar",
Repeat = 3,
};

var connection = new Connection
{
ConnectionString = "Host=127.0.0.1;Port=12345",
};

var options = new Options
{
Delimiter = ", ",
ThrowErrorOnFailure = true,
ErrorMessageOnFailure = null,
};

var result = Xml.Write(input, connection, options, CancellationToken.None);

Assert.That(result.Output, Is.EqualTo("foobar, foobar, foobar"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using dotenv.net;

namespace Frends.Xml.Write.Tests;
Comment thread
MatteoDelOmbra marked this conversation as resolved.
Outdated

public abstract class TestBase
{
protected TestBase()
{
DotEnv.Load();
SecretKey = Environment.GetEnvironmentVariable("FRENDS_SECRET_KEY");
Comment thread
MatteoDelOmbra marked this conversation as resolved.
}

protected string SecretKey { get; }
Comment thread
MatteoDelOmbra marked this conversation as resolved.
Outdated
Comment thread
MatteoDelOmbra marked this conversation as resolved.
}

This file was deleted.

14 changes: 8 additions & 6 deletions FrendsTaskTemplate.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,27 @@

<PropertyGroup>
<PackageType>Template</PackageType>
<PackageVersion>1.7.0</PackageVersion>
<PackageVersion>1.8.0</PackageVersion>
<PackageId>frendstasktemplate</PackageId>
<Title>Frends Task template</Title>
<Authors>Frends</Authors>
<Description>Template for creating Frends Tasks.</Description>
<PackageProjectUrl>https://github.com/FrendsPlatform/FrendsTaskTemplate</PackageProjectUrl>
<PackageTags>dotnet-new;templates;frends</PackageTags>
<TargetFramework>net8.0</TargetFramework>
<PackageReadmeFile>README.md</PackageReadmeFile>

<IncludeContentInPack>true</IncludeContentInPack>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>content</ContentTargetFolders>
<NoDefaultExcludes>true</NoDefaultExcludes>
</PropertyGroup>

<ItemGroup>
<Content Include="Frends.Template\**\*" Exclude="Frends.Template\**\bin\**;Frends.Template\**\obj\**" />
<Compile Remove="**\*" />
<None Include="README.md" Pack="true" PackagePath="\" />
<Content Include="Frends.Template\**\*"
Exclude="Frends.Template\**\bin\**;
Frends.Template\**\obj\**;
Frends.Template\**\.idea\**"/>
<Compile Remove="**\*"/>
<None Include="README.md" Pack="true" PackagePath="\"/>
</ItemGroup>

</Project>
Loading