Beispiel #1
0
        public void UnexpectedType_Throws()
        {
            var col = Mock.Of <IPreLoadDiscardedColumn>(p => p.Repository == CatalogueRepository);

            var factory = new DilutionOperationFactory(col);

            Assert.Throws <ArgumentException>(() => factory.Create(typeof(Catalogue)));
        }
Beispiel #2
0
        public void NullOperation_Throws()
        {
            var col = Mock.Of <IPreLoadDiscardedColumn>(p => p.Repository == CatalogueRepository);

            var factory = new DilutionOperationFactory(col);

            Assert.Throws <ArgumentNullException>(() => factory.Create(null));
        }
Beispiel #3
0
        public void ExpectedType_Created()
        {
            var col = Mock.Of <IPreLoadDiscardedColumn>(p => p.Repository == CatalogueRepository);

            var factory = new DilutionOperationFactory(col);
            var i       = factory.Create(typeof(ExcludeRight3OfUKPostcodes));

            Assert.IsNotNull(i);
            Assert.IsInstanceOf <IDilutionOperation>(i);
        }