public WorkflowInstanceTests()
 {
     _it = new WorkflowInstance();
 }
        public void It_has_a_constructor_that_takes_an_IdmResource_without_Creator()
        {
            var resource = new IdmResource
            {
                DisplayName = "My Display Name",
            };
            var it = new WorkflowInstance(resource);

            Assert.AreEqual("My Display Name", it.DisplayName);
            Assert.IsNull(it.Creator);
        }
Beispiel #3
0
        public void It_has_WorkflowInstance_which_can_be_set_back_to_null()
        {
            // Arrange
            var testWorkflowInstance = new WorkflowInstance { DisplayName = "Test WorkflowInstance" };
            _it.WorkflowInstance = testWorkflowInstance;

            // Act
            _it.WorkflowInstance = null;

            // Assert
            Assert.IsNull(_it.WorkflowInstance);
        }
        public void It_has_a_constructor_that_takes_an_IdmResource()
        {
            var resource = new IdmResource
            {
                DisplayName = "My Display Name",
                Creator = new Person { DisplayName = "Creator Display Name", ObjectID = "Creator ObjectID"},
            };
            var it = new WorkflowInstance(resource);

            Assert.AreEqual("WorkflowInstance", it.ObjectType);
            Assert.AreEqual("My Display Name", it.DisplayName);
            Assert.AreEqual("Creator Display Name", it.Creator.DisplayName);
        }
Beispiel #5
0
        public void It_can_get_and_set_WorkflowInstance()
        {
            // Act
            var testWorkflowInstance = new WorkflowInstance { DisplayName = "Test WorkflowInstance" };
            _it.WorkflowInstance = testWorkflowInstance;

            // Assert
            Assert.AreEqual(testWorkflowInstance.DisplayName, _it.WorkflowInstance.DisplayName);
        }