aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/tests/documentupdatetestcase.h
blob: b8d8294ec0dd9e4aad44a21d1fdc264fa343abf9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/* $Id$*/

#pragma once

#include <cppunit/extensions/HelperMacros.h>

class DocumentUpdate_Test : public CppUnit::TestFixture {
  CPPUNIT_TEST_SUITE(DocumentUpdate_Test);
  CPPUNIT_TEST(testUpdateApplySingleValue);
  CPPUNIT_TEST(testUpdateArray);
  CPPUNIT_TEST(testUpdateWeightedSet);
  CPPUNIT_TEST(testReadSerializedFile);
  CPPUNIT_TEST(testGenerateSerializedFile);
  CPPUNIT_TEST(testSetBadFieldTypes);
  CPPUNIT_TEST(testUpdateApplyNoParams);
  CPPUNIT_TEST(testUpdateApplyNoArrayValues);
  CPPUNIT_TEST(testUpdateArrayEmptyParamValue);
  CPPUNIT_TEST(testUpdateWeightedSetEmptyParamValue);
  CPPUNIT_TEST(testUpdateArrayWrongSubtype);
  CPPUNIT_TEST(testUpdateWeightedSetWrongSubtype);
  CPPUNIT_TEST(testMapValueUpdate);
  CPPUNIT_TEST(testThatDocumentUpdateFlagsIsWorking);
  CPPUNIT_TEST(testThatCreateIfNonExistentFlagIsSerialized50AndDeserialized50);
  CPPUNIT_TEST(testThatCreateIfNonExistentFlagIsSerializedAndDeserialized);
  CPPUNIT_TEST_SUITE_END();

public:
  void setUp();
  void tearDown();

protected:
  void testUpdateApplySingleValue();
  void testUpdateArray();
  void testUpdateWeightedSet();
  void testReadSerializedFile();
  void testGenerateSerializedFile();
  void testSetBadFieldTypes();
  void testUpdateApplyNoParams();
  void testUpdateApplyNoArrayValues();
  void testUpdateArrayEmptyParamValue();
  void testUpdateWeightedSetEmptyParamValue();
  void testUpdateArrayWrongSubtype();
  void testUpdateWeightedSetWrongSubtype();
  void testMapValueUpdate();
  void testThatDocumentUpdateFlagsIsWorking();
  void testThatCreateIfNonExistentFlagIsSerialized50AndDeserialized50();
  void testThatCreateIfNonExistentFlagIsSerializedAndDeserialized();
};