Beispiel #1
0
        public void DNAFactoryTestCreateInstanceShouldReturnObject()
        {
            Mock <IDNAConfiguration> dnaConfigMock = new Mock <IDNAConfiguration>();

            dnaConfigMock.Setup(m => m.ComponentsPattern).Returns("[ACTG]+");
            DNAFactory factory = new DNAFactory();

            factory.DNAConfiguration = dnaConfigMock.Object;
            Assert.AreEqual(factory.CreateInstance(null).GetType(), typeof(DNA));
        }
Beispiel #2
0
        public void DNAFactoryTestCreateInstanceShouldThrowExceptionWhenIsNotConfiguredProperly()
        {
            DNAFactory factory = new DNAFactory();

            factory.CreateInstance(null);
        }