-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathCosmosSettingsBaseTests.cs
More file actions
47 lines (38 loc) · 1.64 KB
/
CosmosSettingsBaseTests.cs
File metadata and controls
47 lines (38 loc) · 1.64 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
39
40
41
42
43
44
45
46
47
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Cosmos.DataTransfer.CosmosExtension;
namespace Cosmos.DataTransfer.CosmosExtension.UnitTests
{
[TestClass]
public class CosmosSettingsBaseTests
{
private class TestableCosmosSettings : CosmosSettingsBase { }
[TestMethod]
public void AllowBulkExecution_Property_ShouldSetAndGet()
{
var settings = new TestableCosmosSettings
{
AllowBulkExecution = true
};
Assert.IsTrue(settings.AllowBulkExecution, "AllowBulkExecution should be true when set to true");
settings.AllowBulkExecution = false;
Assert.IsFalse(settings.AllowBulkExecution, "AllowBulkExecution should be false when set to false");
}
[TestMethod]
public void EnableContentResponseOnWrite_Property_ShouldSetAndGet()
{
var settings = new TestableCosmosSettings
{
EnableContentResponseOnWrite = false
};
Assert.IsFalse(settings.EnableContentResponseOnWrite, "EnableContentResponseOnWrite should be false when set to false");
settings.EnableContentResponseOnWrite = true;
Assert.IsTrue(settings.EnableContentResponseOnWrite, "EnableContentResponseOnWrite should be true when set to true");
}
[TestMethod]
public void EnableContentResponseOnWrite_Property_ShouldDefaultToTrue()
{
var settings = new TestableCosmosSettings();
Assert.IsTrue(settings.EnableContentResponseOnWrite, "EnableContentResponseOnWrite should default to true");
}
}
}