public void CanStartInstance() { // Arrange SmtpBeastServerConfig serverConfig = new SmtpBeastServerConfig { EndPoint = _smtpEndPoint }; using (SmtpBeastServer smtpBeastServer = new SmtpBeastServer(serverConfig)) { // Act smtpBeastServer.Start(); // Assert Assert.True(smtpBeastServer.IsStarted); } }
public void CanCreateSmtpConnectionToInstance() { // Arrange SmtpBeastServerConfig serverConfig = new SmtpBeastServerConfig { EndPoint = _smtpEndPoint }; using (SmtpBeastServer smtpBeastServer = new SmtpBeastServer(serverConfig)) { smtpBeastServer.Start(); // Act SmtpClient smtpClient = new SmtpClient(); string result = smtpClient.Connect(new IPAddress(new byte[] { 127, 0, 0, 1 }), _smtpEndPoint.Port); Console.WriteLine("result: [{0}]", result); // Assert } }