Exemple #1
0
        public void MapFindsProcessTest()
        {
            var contextMap = new BoundedContextModel();

            contextMap.WithAssemblyContaining <Location>();

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

            contextMap.WithAssemblyContaining <Location>();

            Assert.IsTrue(contextMap.IsEventType(typeof(LocationCreated)));
            Assert.IsFalse(contextMap.IsCommandType(typeof(LocationCreated)));
        }
Exemple #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));
        }