示例#1
0
        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!!!");
        }
示例#2
0
 public void UnknownApiNameTest(string apiName)
 {
     try
     {
         ISmtpContext opt = FactorySmtpContext.CreateSmtpObject(apiName);
         Assert.True(false, "Exception shoud be throw for unknow API!!!");
     }
     catch (Exception e)
     {
         Assert.True(true, e.Message);
     }
 }