Ejemplo n.º 1
0
        public void Test_ProductionEventsFactory_EventListCreation(ProductionEventType eventType, Type listType)
        {
            var factory = new ProductionEventsFactory();

            var list = factory.NewEventList(-1, Guid.Empty, eventType);

            Assert.True(list.GetType() == listType, $"Event list created by factory for {eventType} is of type {list.GetType()} not {listType}");

            Assert.True(list.Count() == 0, "Events list not empty after construction");

            Assert.True(list.EventsChanged == false, "Events changed after construction");
        }
Ejemplo n.º 2
0
        public void Test_ProductionEventsFactory_ExpectedNumberOfCreatableEventTypes()
        {
            const int expectedCount = 23;
            var       actualCount   = 0;

            var factory = new ProductionEventsFactory();

            foreach (ProductionEventType eventType in Enum.GetValues(typeof(ProductionEventType)))
            {
                if (factory.NewEventList(-1, Guid.Empty, eventType) != null)
                {
                    actualCount++;
                }
            }

            Assert.True(actualCount == expectedCount,
                        $"Number of production event types is {actualCount}, not {expectedCount} as expected");
        }
Ejemplo n.º 3
0
        public void Test_ProductionEventsFactory_FactoryCreation()
        {
            var factory = new ProductionEventsFactory();

            Assert.True(factory != null);
        }