Add Telegram bot integration and enhance user management features
- Introduced Telegram.Bot package for bot functionality. - Updated user management to include Telegram linking and blocking features. - Enhanced activation request handling with notifications via Telegram. - Added new database entities for Telegram link tokens and login requests. - Implemented traffic synchronization for client stats in the XuiPanelGateway. - Updated application structure to support new test projects and improved dependency injection for Telegram services.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
using PnvPanel.Domain.Configs;
|
||||
using Xunit;
|
||||
|
||||
namespace PnvPanel.Domain.Tests.Configs;
|
||||
|
||||
public class TrafficSampleTests
|
||||
{
|
||||
[Fact]
|
||||
public void Create_SetsAllFields()
|
||||
{
|
||||
var configId = Guid.NewGuid();
|
||||
var timestamp = DateTimeOffset.UtcNow;
|
||||
|
||||
var sample = TrafficSample.Create(configId, timestamp, upBytes: 1000, downBytes: 2000);
|
||||
|
||||
Assert.Equal(configId, sample.ConfigId);
|
||||
Assert.Equal(timestamp, sample.Timestamp);
|
||||
Assert.Equal(1000, sample.UpBytes);
|
||||
Assert.Equal(2000, sample.DownBytes);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user