discord-bot/Tests
13xforever d4e78d1b1b
upgrade solution to net9.0
this bumps docker image base to ubuntu 24.04
2024-11-13 13:43:33 +05:00
..
Properties fix more compiler complaints 2020-11-11 00:30:02 +05:00
Test Files Test project 2018-11-05 19:33:30 +05:00
FlagTests.cs update tests with nunit analyzers suggestions 2023-04-15 15:42:55 +05:00
IrdTests.cs update tests with nunit analyzers suggestions 2023-04-15 15:42:55 +05:00
LogParsingProfiler.cs Some performance and code optimizations (#955) 2024-05-18 14:26:34 +01:00
MemoryCacheExtensionTests.cs update MemoryCache hack extension to support the new implementation 2024-10-15 19:00:50 +05:00
RangeTests.cs update tests with nunit analyzers suggestions 2023-04-15 15:42:55 +05:00
readme.md some docs 2019-04-01 22:52:27 +05:00
ReflectionHacksTests.cs add tests for reflection hacks and remove custom compiler warnings 2022-12-05 14:18:32 +05:00
RegexTest.cs Some performance and code optimizations (#955) 2024-05-18 14:26:34 +01:00
StarsFormatTest.cs use file-scoped namespaces to reduce nesting 2022-06-30 00:59:46 +05:00
StringUtilTests.cs update tests with nunit analyzers suggestions 2023-04-15 15:42:55 +05:00
Tests.csproj upgrade solution to net9.0 2024-11-13 13:43:33 +05:00
TimeParserTests.cs update tests with nunit analyzers suggestions 2023-04-15 15:42:55 +05:00
ZalgoTests.cs Some performance and code optimizations (#955) 2024-05-18 14:26:34 +01:00

Tests

I am using NUnit, mostly because I'm most familiar with this test framework. There's not a lot of tests for the code itself, it is mostly used for testing things out before implementation.

You can use the regular $ dotnet test command to run the tests without any additional tools.

If you want to contribute new test code, I have a couple of preferences:

  • Do use Assert.That(expr, Is/Does/etc) format instead of deprecated Assert.AreEqual() and similar.

  • Try to write the code in the way that does not require the use of InternalsVisibleTo attribute.

  • Tests that require any external data that must be manually supplied, should be disabled by default.