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)); }
public void DNAFactoryTestCreateInstanceShouldThrowExceptionWhenIsNotConfiguredProperly() { DNAFactory factory = new DNAFactory(); factory.CreateInstance(null); }