public void AddObject_WhenGiveAnObject_ShouldAppendTheSerializedObjectToTheEndOfThePath() { var testObject = new ObjectWeWantToSerialize { Prop1 = "testing" }; var url = _target .Base("http://www.base.com") .AddObject(testObject) .AppendAsSlashes(); url.Should().Be("http://www.base.com/" + Serialize(testObject)); }
private static string Serialize(ObjectWeWantToSerialize testObject) { return UrlBuilder.ToBase64(testObject); }