Skip to content

Commit

Permalink
Generate test data.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Jan 12, 2020
1 parent be9a920 commit 4b6c6c7
Show file tree
Hide file tree
Showing 14 changed files with 1,108 additions and 62 deletions.
4 changes: 4 additions & 0 deletions cli/Squidex.CLI/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[*.cs]

# IDE0063: Use simple 'using' statement
csharp_prefer_simple_using_statement = true:none
45 changes: 45 additions & 0 deletions cli/Squidex.CLI/Squidex.CLI.Tests/LoremIpsumTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================

using Squidex.CLI.Commands.Implementation;
using Xunit;

namespace Squidex.CLI.Tests
{
public class LoremIpsumTests
{
[Fact]
public void Should_generate_single_character()
{
var result = LoremIpsum.Text(1, false);

Assert.Equal("l", result);
}

[Fact]
public void Should_generate_html_text()
{
for (var i = 0; i < 5000; i++)
{
var result = LoremIpsum.Text(i, true);

Assert.NotNull(result);
}
}

[Fact]
public void Should_generate_text()
{
for (var i = 0; i < 5000; i++)
{
var result = LoremIpsum.Text(i, false);

Assert.NotNull(result);
}
}
}
}
2 changes: 1 addition & 1 deletion cli/Squidex.CLI/Squidex.CLI.Tests/Squidex.CLI.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="RefactoringEssentials" Version="5.6.0" PrivateAssets="all" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="xunit" Version="2.4.1" />
Expand Down
Loading

0 comments on commit 4b6c6c7

Please sign in to comment.