Ejemplo n.º 1
0
            public void GivenAllNotNullElements_ReturnsError()
            {
                var testCollection = new[] { "subject1", "subject2" };
                var result         = Law.CreateNotNullElements(string.Empty, testCollection).Evaluate();

                Assert.True(result.IsSuccess());
            }
Ejemplo n.º 2
0
            public void GivenAllNullElements_ReturnsError()
            {
                var collectionWithNullValue = new object[] { null, null };
                var result = Law.CreateNotNullElements("subjectName", collectionWithNullValue).Evaluate();

                Assert.False(result.IsSuccess());
                Assert.Equal("'subjectName' should contain not null elements.", result.GetError());
            }