Esempio n. 1
0
        public void ResultValueOkToValue_Ok_ReturnNewValue()
        {
            var numberCollection = Collections.GetRangeNumber();
            var resultCollection = new ResultCollection <int>(numberCollection);

            var resultAfterWhere = resultCollection.ResultCollectionOkToValue(Collections.AggregateToString);

            Assert.True(resultAfterWhere.OkStatus);
            Assert.Equal(Collections.AggregateToString(numberCollection), resultAfterWhere.Value);
        }
Esempio n. 2
0
        public void ResultCollectionContinueToValue_Ok_ReturnNewValue()
        {
            var numberCollection = Collections.GetRangeNumber();
            var resultCollection = new ResultCollection <int>(numberCollection);

            var resultAfterWhere =
                resultCollection.ResultCollectionContinueToValue(numbers => true,
                                                                 okFunc: Collections.AggregateToString,
                                                                 badFunc: _ => CreateErrorListTwoTest());

            Assert.True(resultAfterWhere.OkStatus);
            Assert.Equal(Collections.AggregateToString(numberCollection), resultAfterWhere.Value);
        }