public void IsSame_should_work_for_path() { var subject = new EncodedParameters("token"); var other = new EncodedParameters("token"); subject.Path = other.Path = "/path"; subject.IsSame(other).Should().BeTrue(); other.Path = "/not_path"; subject.IsSame(other).Should().BeFalse(); }
public void IsSame_should_work_for_body() { var subject = new EncodedParameters("token"); var other = new EncodedParameters("token"); subject.BodyHash = other.BodyHash = "hash"; subject.IsSame(other).Should().BeTrue(); other.BodyHash = "not_hash"; subject.IsSame(other).Should().BeFalse(); }
public void IsSame_should_work_for_host() { var subject = new EncodedParameters("token"); var other = new EncodedParameters("token"); subject.Host = other.Host = "foo.com"; subject.IsSame(other).Should().BeTrue(); other.Host = "bar.com"; subject.IsSame(other).Should().BeFalse(); }
public void IsSame_should_work_for_method() { var subject = new EncodedParameters("token"); var other = new EncodedParameters("token"); subject.Method = other.Method = "POST"; subject.IsSame(other).Should().BeTrue(); other.Method = "GET"; subject.IsSame(other).Should().BeFalse(); }
public void IsSame_should_succeed_if_tokens_are_same() { var subject = new EncodedParameters("token"); var other = new EncodedParameters("token"); subject.IsSame(other).Should().BeTrue(); }
public void IsSame_should_fail_if_token_differs() { var subject = new EncodedParameters("token1"); var other = new EncodedParameters("token2"); subject.IsSame(other).Should().BeFalse(); }
public void IsSame_should_work_for_header() { var subject = new EncodedParameters("token"); var other = new EncodedParameters("token"); var list = new EncodedList(new string[] { "a" }, "hash"); subject.RequestHeaders = other.RequestHeaders = list; subject.IsSame(other).Should().BeTrue(); other.RequestHeaders = null; subject.IsSame(other).Should().BeFalse(); other.RequestHeaders = list; subject.RequestHeaders = null; subject.IsSame(other).Should().BeFalse(); other.RequestHeaders = null; subject.RequestHeaders = null; subject.IsSame(other).Should().BeTrue(); }
public void IsSame_should_fail_if_null_param() { var subject = new EncodedParameters("token"); subject.IsSame(null).Should().BeFalse(); }