Tabnine Logo
SphereTestUtils.randomLong
Code IndexAdd Tabnine to your IDE (free)

How to use
randomLong
method
in
io.sphere.sdk.test.SphereTestUtils

Best Java code snippets using io.sphere.sdk.test.SphereTestUtils.randomLong (Showing top 3 results out of 315)

origin: commercetools/commercetools-jvm-sdk

@Test
public void setMaxApplications() throws Exception {
  withPersistentDiscountCode(client(), discountCode -> {
    final long maxApplications = randomLong();
    final DiscountCode updatedDiscountCode =
        client().executeBlocking(DiscountCodeUpdateCommand.of(discountCode, SetMaxApplications.of(maxApplications)));
    assertThat(updatedDiscountCode.getMaxApplications()).isEqualTo(maxApplications);
  });
}

origin: commercetools/commercetools-jvm-sdk

@Test
public void setMaxApplicationsPerCustomer() throws Exception {
  withPersistentDiscountCode(client(), discountCode -> {
    final long maxApplications = randomLong();
    final DiscountCode updatedDiscountCode =
        client().executeBlocking(DiscountCodeUpdateCommand.of(discountCode, SetMaxApplicationsPerCustomer.of(maxApplications)));
    assertThat(updatedDiscountCode.getMaxApplicationsPerCustomer()).isEqualTo(maxApplications);
  });
}
origin: commercetools/commercetools-jvm-sdk

@Test
public void changeGroups() throws Exception {
  withPersistentDiscountCode(client(), discountCode -> {
    final long maxApplications = randomLong();
    final String GROUP_NAME = "GroupName";
    final DiscountCode updatedDiscountCode =
        client().executeBlocking(DiscountCodeUpdateCommand.of(discountCode, ChangeGroups.of(asList(GROUP_NAME))));
    assertThat(updatedDiscountCode.getGroups()).containsExactly(GROUP_NAME);
  });
}
io.sphere.sdk.testSphereTestUtilsrandomLong

Popular methods of SphereTestUtils

  • randomKey
  • randomString
  • assertEventually
  • now
  • randomInt
  • en
  • jsonNodeFromResource
  • stringFromResource
  • asList
  • consumerToFunction
  • draftFromJsonResource
  • englishSlugOf
  • draftFromJsonResource,
  • englishSlugOf,
  • firstOf,
  • oneOf,
  • randomEmail,
  • randomLocalizedString,
  • randomMetaAttributes,
  • randomSlug,
  • randomSortOrder

Popular in Java

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
  • startActivity (Activity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Notification (javax.management)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now