Search in sources :

Example 6 with FieldInclusionChecker

use of jetbrains.buildServer.server.rest.util.fieldInclusion.FieldInclusionChecker in project teamcity-rest by JetBrains.

the class FieldInclusionCheckerTest method testDefaultsIncludeNonDefault.

@Test
public void testDefaultsIncludeNonDefault() {
    FieldInclusionChecker checker = FieldInclusionChecker.getForClass(Model.class);
    Assert.assertNull(checker.isIncluded("includeNonDefault", Fields.SHORT));
    Assert.assertNull(checker.isIncluded("includeNonDefault", Fields.LONG));
    Assert.assertFalse(checker.isIncluded("includeNonDefault", Fields.NONE));
    Assert.assertTrue(checker.isIncluded("includeNonDefault", Fields.ALL));
}
Also used : FieldInclusionChecker(jetbrains.buildServer.server.rest.util.fieldInclusion.FieldInclusionChecker) Test(org.testng.annotations.Test)

Example 7 with FieldInclusionChecker

use of jetbrains.buildServer.server.rest.util.fieldInclusion.FieldInclusionChecker in project teamcity-rest by JetBrains.

the class FieldInclusionCheckerTest method testDefaultsInclude.

@Test
public void testDefaultsInclude() {
    FieldInclusionChecker checker = FieldInclusionChecker.getForClass(Model.class);
    Assert.assertTrue(checker.isIncluded("include", Fields.SHORT));
    Assert.assertTrue(checker.isIncluded("include", Fields.LONG));
    Assert.assertFalse(checker.isIncluded("include", Fields.NONE));
    Assert.assertTrue(checker.isIncluded("include", Fields.ALL));
}
Also used : FieldInclusionChecker(jetbrains.buildServer.server.rest.util.fieldInclusion.FieldInclusionChecker) Test(org.testng.annotations.Test)

Example 8 with FieldInclusionChecker

use of jetbrains.buildServer.server.rest.util.fieldInclusion.FieldInclusionChecker in project teamcity-rest by JetBrains.

the class FieldInclusionCheckerTest method testInclude.

@Test
public void testInclude() {
    FieldInclusionChecker checker = FieldInclusionChecker.getForClass(Model.class);
    Assert.assertTrue(checker.isIncluded("getter", new Fields("getter")));
}
Also used : Fields(jetbrains.buildServer.server.rest.model.Fields) FieldInclusionChecker(jetbrains.buildServer.server.rest.util.fieldInclusion.FieldInclusionChecker) Test(org.testng.annotations.Test)

Aggregations

FieldInclusionChecker (jetbrains.buildServer.server.rest.util.fieldInclusion.FieldInclusionChecker)8 Test (org.testng.annotations.Test)7 Fields (jetbrains.buildServer.server.rest.model.Fields)3 Status (jetbrains.buildServer.messages.Status)1 TestOccurrence (jetbrains.buildServer.server.rest.model.problem.TestOccurrence)1 NotNull (org.jetbrains.annotations.NotNull)1