forked from aiska/BpmNet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestBooleanVariable.cs
More file actions
58 lines (57 loc) · 1.7 KB
/
Copy pathTestBooleanVariable.cs
File metadata and controls
58 lines (57 loc) · 1.7 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
48
49
50
51
52
53
54
55
56
57
58
using Microsoft.VisualStudio.TestTools.UnitTesting;
using BPMNET.Core.Variable;
namespace BPMNET.UnitTest
{
[TestClass]
public class TestBooleanVariable
{
[TestMethod]
public void TestGetNotBoolValue()
{
BooleanVariable var = new BooleanVariable();
bool actual = var.CheckForStore(var.CheckForStore(4));
Assert.IsTrue(actual);
}
[TestMethod]
public void TestGetNotBoolValue2()
{
BooleanVariable var = new BooleanVariable();
bool actual = var.CheckForStore(var.CheckForStore(4));
Assert.IsTrue(actual);
}
[TestMethod]
public void TestTrueStringValue()
{
BooleanVariable var = new BooleanVariable();
var.CheckForStore("true");
Assert.IsTrue((bool)var.Value);
}
[TestMethod]
public void TestFalseStringValue()
{
BooleanVariable var = new BooleanVariable();
var.CheckForStore("false");
Assert.IsFalse((bool)var.Value);
}
[TestMethod]
public void TestBoolValue()
{
BooleanVariable var = new BooleanVariable();
var.CheckForStore(true);
Assert.IsTrue((bool)var.Value);
}
[TestMethod]
public void TestGetNullValue()
{
BooleanVariable var = new BooleanVariable();
bool actual = var.CheckForStore(null);
Assert.IsFalse(actual);
}
[TestMethod]
public void TestGetBoolType()
{
BooleanVariable var = new BooleanVariable();
Assert.AreEqual("bool", var.StoreType);
}
}
}