Ejemplo n.º 1
0
        private void SetUp(List <Guid> testIndexes, IRepository <ArticleDefinition> repository)
        {
            var articleDefn = new ArticleDefinition();

            testIndexes.ForEach(idx => articleDefn.AddIndex(new ArticleIndex(idx, It.IsAny <IndexType>())));

            repository.Save(articleDefn);
        }
Ejemplo n.º 2
0
        public void AddedIndexRaisesNewIndexEvent()
        {
            //setup
            var ad       = new ArticleDefinition();
            var indexRef = Guid.NewGuid();
            var index    = new ArticleIndex(indexRef, IndexType.Manufacturer);

            var indexAddedEvent = ad.AddIndex(index);

            Assert.IsInstanceOfType(indexAddedEvent, typeof(IndexAddedEvent));
        }