public void KnownNameTest(string apiName) { FactorySmtpContext.SetLoggerFactory(new Mock <ILoggerFactory>().Object); ISmtpContext opt = FactorySmtpContext.CreateSmtpObject(apiName); opt.GetLogger(); Assert.IsNotNull(opt, "Object must not be null!!!"); }