public void Topic_Method() { var call = new LawsLawApiCall(); Assert.False(call.Parameters.ContainsKey("topic")); Assert.True(ReferenceEquals(call.Topic(1), call)); Assert.Equal((long) 1, call.Parameters["topic"]); }
public void Topic_Method() { Assert.Throws<ArgumentNullException>(() => ILawsLawApiCallExtensions.Topic(null, new Topic())); Assert.Throws<ArgumentNullException>(() => new LawsLawApiCall().Topic(null)); var call = new LawsLawApiCall(); Assert.True(ReferenceEquals(call.Topic(new Topic { Id = 1 }), call)); Assert.Equal((long) 1, call.Parameters["topic"]); }