Skip to content

Mock solenoids  #86

Closed
Closed

Description

@FilipKernan

The instantaneousSolenoid() method and the manualSolenoid() return essentially the same object. From what I have gathered from the code is that the manualSolenoid() should be set to false.
`/**
* Create a solenoid that operates instantaneously and immediately stops.
*
* @return the mock solenoid; never null
*/
public static MockSolenoid instantaneousSolenoid() {
return new MockSolenoid(true);
}

/**
 * Create a solenoid that operates infinitely slowly and must be manually {@link MockSolenoid#stop() stopped}.
 *
 * @return the mock solenoid; never null
 */
public static MockSolenoid manualSolenoid() {
    return new MockSolenoid(true);
}`

Activity

  1. rhauch commented on Dec 29, 2016

    @rhauch
    Member

    @FilipKernan, yeah, I think you're right. The manualSolenoid method should call new MockSolenoid(false);. Do you want to submit a pull request? (If so, please feel free to add your name to the CONTRIBUTORS file in the root of the repository in a second commit within the same pull request.)

  2. FilipKernan commented on Dec 29, 2016

    @FilipKernan
    ContributorAuthor

    @rhauch sure. Will do.

  3. rhauch commented on Dec 29, 2016

    @rhauch
    Member

    Fixed by #87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions