public void Convocation_Method() { var call = new VotesSearchLawApiCall(); Assert.False(call.Parameters.ContainsKey("convocation")); Assert.True(ReferenceEquals(call, call.Convocation(1))); Assert.Equal((long)1, call.Parameters["convocation"]); }
public void Convocation_Method() { Assert.Throws<ArgumentNullException>(() => IVotesSearchLawApiCallExtensions.Convocation(null, new Convocation())); Assert.Throws<ArgumentNullException>(() => new VotesSearchLawApiCall().Convocation(null)); var call = new VotesSearchLawApiCall(); Assert.False(call.Parameters.Any()); Assert.True(ReferenceEquals(call, call.Convocation(new Convocation { Id = 1 }))); Assert.Equal((long)1, call.Parameters["convocation"]); }