feat: add jetstream config validation models
This commit is contained in:
15
tests/NATS.Server.Tests/JetStreamConfigValidationTests.cs
Normal file
15
tests/NATS.Server.Tests/JetStreamConfigValidationTests.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using NATS.Server.JetStream.Models;
|
||||
using NATS.Server.JetStream.Validation;
|
||||
|
||||
namespace NATS.Server.Tests;
|
||||
|
||||
public class JetStreamConfigValidationTests
|
||||
{
|
||||
[Fact]
|
||||
public void Stream_requires_name_and_subjects()
|
||||
{
|
||||
var config = new StreamConfig { Name = "", Subjects = [] };
|
||||
var result = JetStreamConfigValidator.Validate(config);
|
||||
result.IsValid.ShouldBeFalse();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user