Skip to content

Commit

Permalink
add: Added new tests (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladisvell committed Jan 20, 2024
1 parent 6c32e7b commit bd04338
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Bot.Tests/Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
using System.Text;
using System.Threading.Tasks;
using Amazon.S3;
using EgeBot.Bot.Infrastructure;
using EgeBot.Bot.Services;
using EgeBot.Bot.Services.Handlers;
using EgeBot.Bot.Services.Interfaces;
using Microsoft.Extensions.Configuration;
using NUnit.Framework;
using Telegram.Bot;
Expand Down Expand Up @@ -69,5 +73,28 @@ public void DoesConfigurationFileExist()
// IAmazonS3 S3Client = new AmazonS3Client(keyID, secretKey, s3Config);
//}
}

[TestFixture]
public class ResponseChecks
{
private IUpdateHandler updateHandler;

public ResponseChecks()
{
updateHandler = new UpdateHandler(new ScenarioHandler(new DbContexter(null)));
}

[Test]
public void UpdateHandlerWrongCommandCheck()
{
Assert.DoesNotThrowAsync(() => updateHandler.Generate(new Data("asdasdadasd", "a121212"), 0));
}

[Test]
public void UpdateHandlerEmptyCommandCheck()
{
Assert.DoesNotThrowAsync(() => updateHandler.Generate(Data.Empty, 0));
}
}
}
#endif

0 comments on commit bd04338

Please sign in to comment.