Ejemplo n.º 1
0
        public void MapFindsProcessTest()
        {
            var contextMap = new BoundedContextModel();

            contextMap.WithAssemblyContaining <Location>();

            Assert.IsTrue(contextMap.IsEventHandlerType(typeof(Movement)));
        }
Ejemplo n.º 2
0
        public void MapEventTest()
        {
            var contextMap = new BoundedContextModel();

            contextMap.WithAssemblyContaining <Location>();

            Assert.IsTrue(contextMap.IsEventType(typeof(LocationCreated)));
            Assert.IsFalse(contextMap.IsCommandType(typeof(LocationCreated)));
        }
Ejemplo n.º 3
0
        public void MapFindsAggregateTest()
        {
            var contextMap = new BoundedContextModel();

            contextMap.WithAssemblyContaining <Movement>();

            var aggregateType = (contextMap as IBoundedContextModel).GetAggregateType(typeof(CreateLocation));

            Assert.IsNotNull(aggregateType);
            Assert.IsTrue(aggregateType == typeof(Location));
        }