コード例 #1
0
 public void Current_Method()
 {
   var call = new DeputiesLawApiCall();
   Assert.False(call.Parameters.ContainsKey("current"));
   Assert.True(ReferenceEquals(call.Current(), call));
   Assert.Equal("true", call.Parameters["current"]);
   Assert.Equal("false", call.Current(false).Parameters["current"]);
 }
コード例 #2
0
    public void Position_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new DeputiesLawApiCall().Position(null));
      Assert.Throws<ArgumentException>(() => new DeputiesLawApiCall().Position(string.Empty));

      var call = new DeputiesLawApiCall();
      Assert.False(call.Parameters.ContainsKey("position"));
      Assert.True(ReferenceEquals(call.Position("position"), call));
      Assert.Equal("position", call.Parameters["position"]);
    }
コード例 #3
0
 public void Constructors()
 {
   var call = new DeputiesLawApiCall();
   Assert.False(call.Parameters.Any());
 }