-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathClusterModelTests.cs
More file actions
38 lines (33 loc) · 1.07 KB
/
ClusterModelTests.cs
File metadata and controls
38 lines (33 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using FluentAssertions;
using KustoSchemaTools.Model;
namespace KustoSchemaTools.Tests.Model
{
public class ClusterModelTests
{
[Fact]
public void Cluster_Should_Initialize_With_Default_Values()
{
// Act
var cluster = new Cluster();
// Assert
cluster.Name.Should().BeNull();
cluster.Url.Should().BeNull();
cluster.Scripts.Should().NotBeNull().And.BeEmpty();
}
[Fact]
public void Cluster_Should_Allow_Property_Assignment()
{
// Arrange
var cluster = new Cluster();
var script = new DatabaseScript("show cluster", 10);
// Act
cluster.Name = "TestCluster";
cluster.Url = "https://test.kusto.windows.net";
cluster.Scripts.Add(script);
// Assert
cluster.Name.Should().Be("TestCluster");
cluster.Url.Should().Be("https://test.kusto.windows.net");
cluster.Scripts.Should().ContainSingle().Which.Should().Be(script);
}
}
}