예제 #1
0
            public void Should_Add_Criteria()
            {
                // Given
                var task = new ActionTask("task");

                // When
                task.AddCriteria(() => true);

                // Then
                Assert.Equal(1, task.Criterias.Count);
            }
예제 #2
0
            public void Should_Throw_If_Criteria_Is_Null()
            {
                // Given
                var task = new ActionTask("task");

                // When
                var result = Record.Exception(() => task.AddCriteria(null));

                // Then
                Assert.IsArgumentNullException(result, "criteria");
            }
예제 #3
0
            public void Should_Throw_If_Criteria_Is_Null()
            {
                // Given
                var task = new ActionTask("task");

                // When
                var exception = Record.Exception(() => task.AddCriteria(null));

                // Then
                Assert.IsType <ArgumentNullException>(exception);
                Assert.Equal("criteria", ((ArgumentNullException)exception).ParamName);
            }