Class TestDefinition


  • public class TestDefinition
    extends java.lang.Object
    Models a single test
    • Constructor Detail

      • TestDefinition

        public TestDefinition()
      • TestDefinition

        @Deprecated
        public TestDefinition​(java.lang.String version,
                              @Nullable
                              java.lang.String rule,
                              @Nonnull
                              TestType testType,
                              @Nonnull
                              java.lang.String salt,
                              @Nonnull
                              java.util.List<TestBucket> buckets,
                              @Nonnull
                              java.util.List<Allocation> allocations,
                              @Nonnull
                              java.util.Map<java.lang.String,​java.lang.Object> constants,
                              @Nonnull
                              java.util.Map<java.lang.String,​java.lang.Object> specialConstants,
                              @Nullable
                              java.lang.String description)
        Deprecated.
      • TestDefinition

        @Deprecated
        public TestDefinition​(java.lang.String version,
                              @Nullable
                              java.lang.String rule,
                              @Nonnull
                              TestType testType,
                              @Nonnull
                              java.lang.String salt,
                              @Nonnull
                              java.util.List<TestBucket> buckets,
                              @Nonnull
                              java.util.List<Allocation> allocations,
                              boolean silent,
                              @Nonnull
                              java.util.Map<java.lang.String,​java.lang.Object> constants,
                              @Nonnull
                              java.util.Map<java.lang.String,​java.lang.Object> specialConstants,
                              @Nullable
                              java.lang.String description)
        Deprecated.
      • TestDefinition

        @Deprecated
        public TestDefinition​(java.lang.String version,
                              @Nullable
                              java.lang.String rule,
                              @Nonnull
                              TestType testType,
                              @Nonnull
                              java.lang.String salt,
                              @Nonnull
                              java.util.List<TestBucket> buckets,
                              @Nonnull
                              java.util.List<Allocation> allocations,
                              boolean silent,
                              @Nonnull
                              java.util.Map<java.lang.String,​java.lang.Object> constants,
                              @Nonnull
                              java.util.Map<java.lang.String,​java.lang.Object> specialConstants,
                              @Nullable
                              java.lang.String description,
                              @Nonnull
                              java.util.List<java.lang.String> metaTags)
        Deprecated.
      • TestDefinition

        public TestDefinition​(@Nonnull
                              TestDefinition other)
    • Method Detail

      • getVersion

        public java.lang.String getVersion()
      • setVersion

        @Deprecated
        public void setVersion​(java.lang.String version)
        Deprecated.
      • getConstants

        @Nonnull
        public java.util.Map<java.lang.String,​java.lang.Object> getConstants()
      • setConstants

        @Deprecated
        public void setConstants​(@Nonnull
                                 java.util.Map<java.lang.String,​java.lang.Object> constants)
        Deprecated.
      • getSpecialConstants

        @Nonnull
        public java.util.Map<java.lang.String,​java.lang.Object> getSpecialConstants()
      • setSpecialConstants

        @Deprecated
        public void setSpecialConstants​(@Nonnull
                                        java.util.Map<java.lang.String,​java.lang.Object> specialConstants)
        Deprecated.
      • getRule

        @Nullable
        public java.lang.String getRule()
      • setSubrule

        @Deprecated
        public void setSubrule​(@Nullable
                               java.lang.String subrule)
        Deprecated.
      • setRule

        @Deprecated
        public void setRule​(@Nullable
                            java.lang.String rule)
        Deprecated.
      • getSalt

        @Nonnull
        public java.lang.String getSalt()
      • setSalt

        @Deprecated
        public void setSalt​(@Nonnull
                            java.lang.String salt)
        Deprecated.
      • getBuckets

        @Nonnull
        public java.util.List<TestBucket> getBuckets()
      • setBuckets

        @Deprecated
        public void setBuckets​(@Nonnull
                               java.util.List<TestBucket> buckets)
        Deprecated.
      • getAllocations

        @Nonnull
        public java.util.List<Allocation> getAllocations()
      • setAllocations

        @Deprecated
        public void setAllocations​(@Nonnull
                                   java.util.List<Allocation> allocations)
        Deprecated.
      • setSilent

        @Deprecated
        public void setSilent​(boolean silent)
        Deprecated.
      • getSilent

        public boolean getSilent()
      • getTestType

        @Nonnull
        public TestType getTestType()
      • setTestType

        @Deprecated
        public void setTestType​(TestType testType)
        Deprecated.
      • setDescription

        @Deprecated
        public void setDescription​(java.lang.String description)
        Deprecated.
      • getDescription

        @Nullable
        public java.lang.String getDescription()
      • getMetaTags

        @Nonnull
        public java.util.List<java.lang.String> getMetaTags()
        metaTags allow to group and filter tests.
      • setMetaTags

        @Deprecated
        public void setMetaTags​(java.util.List<java.lang.String> metaTags)
        Deprecated.
      • getDependsOn

        @Nullable
        public TestDependency getDependsOn()
        Dependency to activate this test. This test won't be evaluated if the dependency condition isn't satisfied.
      • setDependsOn

        @Deprecated
        public void setDependsOn​(@Nullable
                                 TestDependency dependsOn)
        Deprecated.
      • getEvaluateForIncognitoUsers

        public boolean getEvaluateForIncognitoUsers()
      • getEnableUnitlessAllocations

        public boolean getEnableUnitlessAllocations()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object otherDefinition)
        similar to generated equals() method, but special treatment of buckets, because testBucket has unconventional equals/hashcode implementation for undocumented reason.

        Difference is checked by Unit test.

        Overrides:
        equals in class java.lang.Object