Пример #1
0
 public void TestInitialize()
 {
     expected = new BpmActivity()
     {
         BusinessKey = Guid.NewGuid().ToString(),
         EndTime = DateTime.Today,
         StartTime = DateTime.Today.AddDays(-1),
         Id = Guid.NewGuid().ToString(),
         Name = Guid.NewGuid().ToString(),
         ProcessInstanceId = Guid.NewGuid().ToString(),
         ProcessDefinitionId = Guid.NewGuid().ToString(),
         State = 1,
         Duration="2"
     };
 }
Пример #2
0
        public void Given2BpmActivity_WhenBothObjectAreEqualInValue_ThenReturnTrue()
        {
            var actual = new BpmActivity()
            {
                BusinessKey = expected.BusinessKey,
                EndTime = expected.EndTime,
                StartTime = expected.StartTime,
                Id = expected.Id,
                Name = expected.Name,
                ProcessInstanceId = expected.ProcessInstanceId,
                ProcessDefinitionId = expected.ProcessDefinitionId,
                State = expected.State,
                Duration=expected.Duration
            };

            Assert.IsTrue(expected.Equals(actual));
        }
Пример #3
0
        public void GivenAListAndBpmActivity_WhenObjectWithEqualValueIsInList_ThenReturnTrue()
        {
            var list = new List<BpmActivity>() { expected };

            var actual = new BpmActivity()
            {
                BusinessKey = expected.BusinessKey,
                EndTime = expected.EndTime,
                StartTime = expected.StartTime,
                Id = expected.Id,
                Name = expected.Name,
                ProcessInstanceId = expected.ProcessInstanceId,
                ProcessDefinitionId = expected.ProcessDefinitionId,
                State = expected.State,
                Duration = expected.Duration
            };

            Assert.IsTrue(list.Contains(actual));
        }