public void ToTitleCase()
        {
            var words = RandomData.GenerateWords(10, 10, 10)
                        .ToDelimitedString(dotNetTips.Utility.Standard.Common.ControlChars.Space);

            base.Consumer.Consume(words.ToTitleCase());
        }
        public void ToTitleCase()
        {
            var words = RandomData.GenerateWords(10, 10, 10)
                        .ToDelimitedString(ControlChars.Space);

            base.Consumer.Consume(words.ToTitleCase());
        }
        public void GenerateWordsTest()
        {
            const int WordCount = 10;

            var words = RandomData.GenerateWords(WordCount, 10, 25);

            Assert.IsTrue(words.Count == WordCount);
        }
        public void ToDistinctTest()
        {
            var people = RandomData.GenerateWords(10, 10, 100).ToArray();

            people = people.AddLast(people.First());

            Assert.IsTrue(people.ToDistinct().FastCount() == 10);
        }
        public void ToTitleCaseTest()
        {
            var words = RandomData.GenerateWords(10, 10, 20).ToDelimitedString(ControlChars.Space);

            var testValue = words.ToTitleCase();

            Assert.IsTrue(testValue.IsNotEmpty());
        }
Beispiel #6
0
        public void ToTitleCaseTest()
        {
            var words = RandomData.GenerateWords(10, 10, 10)
                        .ToDelimitedString(dotNetTips.Utility.Standard.Common.ControlChars.Space);

            var testValue = words.ToTitleCase();

            Assert.IsTrue(testValue.IsNotEmpty());
        }
Beispiel #7
0
        public void AppendJoinTest01()
        {
            var sb     = new StringBuilder();
            var values = RandomData.GenerateWords(count: 5, minLength: 5, maxLength: 7);

            sb.AppendValues(", ", values);

            Assert.IsTrue(sb.Length > 10);
        }
        public void ToDelimitedDictionaryTest()
        {
            var words = RandomData.GenerateWords(count: 10, minLength: 25, maxLength: 50);

            var dic = new Dictionary <string, string>(10);

            foreach (var item in words)
            {
                dic.Add(item, item);
            }

            Assert.IsNotNull((dic as IDictionary).ToDelimitedString(',').Length > 5);
        }
        public void ToDelimitedStringTest()
        {
            var words = RandomData.GenerateWords(10, 25, 50);

            Assert.IsNotNull(words.ToDelimitedString(','));
        }
 public override void Setup()
 {
     base.Setup();
     this._commaDelimitedString = RandomData.GenerateWords(10, 5, 10).ToDelimitedString();
     this._stringToTrim         = "         " + LongTestString + "                   ";
 }
Beispiel #11
0
        /// <summary>
        /// Setups this instance.
        /// </summary>
        public override void Setup()
        {
            base.Setup();

            ConsoleLogger.Default.WriteLine(LogKind.Info, $"Collection Count={this.Count}.");

            this.PersonProperList = new List <PersonProper>();
            this.PersonProperList.AddRange(RandomData.GeneratePersonCollection <PersonProper>(this.Count));

            this.LoadPersonRefArray();
            this.LoadPersonValArray();

            this.PersonProperCollection = this.PersonProperList.ToCollection();

            this.PersonProperObservableList = this.PersonProperList.ToObservableList();

            this.PersonProperFastSortedList = this.PersonProperList.ToFastSortedList();

            this.PersonProperHashSet = this.PersonProperList.ToHashSet();

            this.PersonProperConcurrentHashSet = this.PersonProperHashSet.ToConcurrentHashSet();

            this.PersonProperDistinctBlockingCollection = this.PersonProperList.ToDistinctBlockingCollection(false);

            this.PersonProperDictionary = this.PersonProperList.ToDictionary(p => p.Id);

            this.PersonProperSortableList = new List <PersonProper>(this.PersonProperList);

            this.PersonProperArrayFull = this.PersonProperList.ToArray();

            this.PersonProperArrayHalf = this.PersonProperList.Take(this.Count / 2).ToArray();

            this.PersonProperListHalf = this.PersonProperList.Take(this.Count / 2).ToList();

            this.ByteArray = RandomData.GenerateByteArray(this.Count / 2);

            this.CoordinateProperArray = RandomData.GenerateCoordinateCollection <CoordinateProper>(this.Count).ToArray();

            this.CommaDelimitedString = this.CoordinateProperArray.ToDelimitedString();

            this.StringArray = RandomData.GenerateWords(this.Count, minLength: 15, maxLength: 15).ToArray();

            this.PersonRecordArray = RandomData.GeneratePersonCollection(this.Count).ToArray();

            this.PersonRecordList = RandomData.GeneratePersonCollection(this.Count);

            this.PersonProperImmutableList = this.PersonProperList.ToImmutable();

            this.PersonProperObservableCollection = this.PersonProperList.ToObservableCollection();

            this.PersonProperReadOnlyCollection = this.PersonProperList.ToReadOnlyCollection();

            this.PersonProperImmutableDictionary = this.PersonProperDictionary.ToImmutable();

            this.PersonProperLinkedList = this.PersonProperList.ToLinkedList();

            this.PersonProperConcurrentBag = new ConcurrentBag <PersonProper>(this.PersonProperList);

            this.CoordinateProperList = this.CoordinateProperArray.ToList();

            this.PersonProperConcurrentDictionary = new ConcurrentDictionary <string, PersonProper>(this.PersonProperDictionary);

            this.PersonProperBlockingCollection = this.PersonProperList.ToBlockingCollection();

            this.PersonProperDistinctConcurrentBag = this.PersonProperList.ToDistinctConcurrentBag();

            this.PersonList = RandomData.GeneratePersonCollection <Tester.Models.RefTypes.Person>(this.Count);

            this.PersonProperEnumerable = this.PersonProperList.AsEnumerable();

            this.PersonValList = RandomData.GeneratePersonCollection <Tester.Models.ValueTypes.Person>(Count);
        }