public void BuildApiUrlTest() { ILinkedInAuthorization authorization = new LinkedInAuthorizationMock(); LinkedInService_Accessor target = new LinkedInService_Accessor(authorization); Collection <Resource> resources = new Collection <Resource>(); resources.Add(new Resource { Name = Constants.PeopleResourceName, Identifier = Constants.CurrentUserIdentifier }); resources.Add(new Resource { Name = Constants.ResourceName }); QueryStringParameters parameters = new QueryStringParameters(); parameters.Add(Constants.QueryStringParam1, Constants.QueryStringValue1); parameters.Add(Constants.QueryStringParam2, Constants.QueryStringValue2); UriBuilder expected = new UriBuilder("http://api.linkedin.com/v1/people/~/resource?param1=value1¶m2=value2"); UriBuilder actual = UriUtility.BuildApiUrl(resources, parameters); Assert.AreEqual(expected, actual); }