public void Should_be_possible_to_get_textfilecontent_multiline_behavior() { // If an text file content object has no behaviors defined explicity, the default value for multiline behavior is true. Assert.IsNull(TextFileContent54ObjectsWithoutBehaviors.Items.OfType <Textfilecontent54Behaviors>().FirstOrDefault(), "No behaviors must be defined for next assert."); Assert.IsTrue(TextFileContent54ObjectsWithoutBehaviors.IsMultiline(), "Unexpected behavior ('multiline') value was found."); Assert.IsNotNull(TextFileContent54ObjectWithMultilineBehavior.Items.OfType <Textfilecontent54Behaviors>().FirstOrDefault(), "For next assert, a behavior must defined explicity."); Assert.IsTrue(TextFileContent54ObjectWithMultilineBehavior.IsMultiline(), "Unexpected behavior ('multiline') value was found."); Assert.IsNotNull(TextFileContent54ObjectWithoutMultilineBehavior.Items.OfType <Textfilecontent54Behaviors>().FirstOrDefault(), "For next assert, a behavior must defined explicity."); Assert.IsFalse(TextFileContent54ObjectWithoutMultilineBehavior.IsMultiline(), "Unexpected behavior ('multiline') value was found."); }
private IList <ItemType> ProcessOperationsPatterns( textfilecontent54_object fileContentObject, IEnumerable <string> completePaths) { var result = new List <ItemType>(); var pattern = ((EntityObjectStringType)fileContentObject.GetItemValue(textfilecontent54_ItemsChoices.pattern)).Value; var instance = ((EntitySimpleBaseType)fileContentObject.GetItemValue(textfilecontent54_ItemsChoices.instance)).Value; var multilineBehavior = fileContentObject.IsMultiline(); var singlelineBehavior = fileContentObject.IsSingleline(); foreach (var filepath in completePaths) { var parameters = TextFileContentObjectCollector.GetDictionaryWithParametersToSearchTextFileConten( filepath, pattern, Int32.Parse(instance), multilineBehavior, singlelineBehavior); result.Add(this.CollectItem(parameters)); parameters.Clear(); } return(result); }