Update test projects to properly build and run under dotnet7

This commit is contained in:
Wojciech Figat
2023-01-11 14:27:17 +01:00
parent 3c40c22049
commit 474ce10e7e
34 changed files with 21581 additions and 1311 deletions

View File

@@ -0,0 +1,26 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using NUnit.Framework;
namespace FlaxEngine.Tests
{
/// <summary>
/// Tests for <see cref="StringUtils"/>.
/// </summary>
[TestFixture]
public class TestStringUtils
{
/// <summary>
/// Test incrementing name numbers.
/// </summary>
[Test]
public void TestIncName()
{
Assert.AreEqual("my Name", StringUtils.IncrementNameNumber("my Name", null));
Assert.AreEqual("my Name", StringUtils.IncrementNameNumber("my Name", x => true));
Assert.AreEqual("my Name 10", StringUtils.IncrementNameNumber("my Name 1", x => x.EndsWith("10")));
Assert.AreEqual("my Name (10)", StringUtils.IncrementNameNumber("my Name (1)", x => x.EndsWith("10)")));
Assert.AreEqual("my Name110", StringUtils.IncrementNameNumber("my Name100", x => x.EndsWith("110")));
}
}
}