Skip to content

Instantly share code, notes, and snippets.

@jbrechtel
Created January 24, 2011 01:40
Show Gist options
  • Save jbrechtel/792669 to your computer and use it in GitHub Desktop.
Save jbrechtel/792669 to your computer and use it in GitHub Desktop.
package com.nevercertain.wifipasswords
import org.scalatest.matchers.ShouldMatchers
import org.scalatest.Spec
class NetworkParserSpecs extends Spec with ShouldMatchers {
it("should create a WEP network with the expected password") {
val wepNetwork = """
network={
ssid="joes wifi"
key_mgmt=NONE
auth_alg=OPEN SHARED
wep_key0=7108613811
priority=25
}
"""
val networks = NetworkParser.parse(wepNetwork)
networks(0).password should equal("7108613811")
//or
networks(0).password.should(equal("7108613811"))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment