Beispiel #1
0
        public void CompareTwoValues_ResultOrderMustBeSorted(
            string valueA,
            string valueB,
            int cmpResult
            )
        {
            // Arrange
            var testSubject = new AlphaNumericComparer();

            // Act
            int result = testSubject.Compare(valueA, valueB);

            // Assert
            _ = result.Should().Be(cmpResult, null);
        }
Beispiel #2
0
        private void InitializeEventManager()
        {
            // Subscribe to events;
            EventManager.Instance().EventAdd += (evChain) =>
            {
                EventChain_CreateItem(evChain);
            };
            EventManager.Instance().EventRemove += (evChain) =>
            {
            };
            EventManager.Instance().EventListLoad += (evChains) =>
            {
                evChains.Sort((a, b) => { return(AlphaNumericComparer.Compare(a.Name, b.Name)); });

                foreach (var evChain in evChains)
                {
                    EventChain_CreateItem(evChain);
                }
            };

            // Initialization;
            EventManager.Instance().LoadEvents();
        }