use of com.kickstarter.models.Web in project android-oss by kickstarter.
the class ThanksShareHolderViewModelTest method setUpProjectWithWebUrls.
private Project setUpProjectWithWebUrls() {
final Long creatorId = 15L;
final User creator = UserFactory.creator().toBuilder().id(creatorId).build();
final String slug = "best-project-2k19";
final String projectUrl = "https://www.kck.str/projects/" + creator.id() + "/" + slug;
final Web webUrls = Web.builder().project(projectUrl).rewards("$projectUrl/rewards").updates("$projectUrl/posts").build();
return ProjectFactory.project().toBuilder().name("Best Project 2K19").urls(Urls.builder().web(webUrls).build()).build();
}
use of com.kickstarter.models.Web in project android-oss by kickstarter.
the class RefTagUtilsTest method testBuildCookieForRefTagAndProject_WithMalformedUrl.
@Test
public void testBuildCookieForRefTagAndProject_WithMalformedUrl() {
final Web webUrls = ProjectFactory.project().urls().web().toBuilder().project("such:\\bad^<data").build();
final Urls urls = ProjectFactory.project().urls().toBuilder().web(webUrls).build();
final Project project = ProjectFactory.project().toBuilder().urls(urls).build();
final RefTag refTag = RefTag.category();
final HttpCookie cookie = RefTagUtils.buildCookieWithRefTagAndProject(refTag, project);
assertNull(cookie);
}