public void Get_IWaitConnectionCommandWithDefault_ConnectionWaitCommand() { var command = new ConnectionWaitXml(); command.SpecificConnectionString = ConnectionStringReader.GetSqlClient(); var factory = new ConnectionWaitFactory(); var impl = factory.Get(command); Assert.That(impl, Is.TypeOf <ConnectionWaitCommand>()); var waitConnectionCommand = impl as ConnectionWaitCommand; Assert.That(waitConnectionCommand.TimeOut, Is.EqualTo(60000)); }
public void Get_IWaitConnectionCommand_ConnectionWaitCommand() { var command = Mock.Of <IConnectionWaitCommand>( m => m.ConnectionString == ConnectionStringReader.GetSqlClient() && m.TimeOut == 70000 ); var factory = new ConnectionWaitFactory(); var impl = factory.Get(command); Assert.That(impl, Is.TypeOf <ConnectionWaitCommand>()); var waitConnectionCommand = impl as ConnectionWaitCommand; Assert.That(waitConnectionCommand.ConnectionString, Is.EqualTo(command.ConnectionString)); Assert.That(waitConnectionCommand.TimeOut, Is.EqualTo(command.TimeOut)); }