コード例 #1
0
ファイル: StretchrRequestTest.cs プロジェクト: n3xes/Stretchr
        public void ConstructKeyValueTest()
        {
            const String KEY = "key";

            const String EXPECTED = ":key=";

            String actual = new StretchrRequest_Accessor<String>(new StretchrClient(), response => { }, (request, statusCode, exception) => { }).ConstructKeyValue(KEY);

            Assert.AreEqual(EXPECTED, actual);
        }
コード例 #2
0
ファイル: StretchrRequestTest.cs プロジェクト: n3xes/Stretchr
        public void ConstructFunctionParametersTestSingle()
        {
            const String KEY1 = "key1";

            IList<String> functionParameters = new List<String>();
            functionParameters.Add(KEY1);

            const String EXPECTED = KEY1;

            String actual = new StretchrRequest_Accessor<String>(new StretchrClient(), response => { }, (request, statusCode, exception) => { }).ConstructFunctionParameters(functionParameters);

            Assert.AreEqual(EXPECTED, actual);
        }
コード例 #3
0
ファイル: StretchrRequestTest.cs プロジェクト: n3xes/Stretchr
        public void ConstructFunctionParametersTestNull()
        {
            String actual = new StretchrRequest_Accessor<String>(new StretchrClient(), response => { }, (request, statusCode, exception) => { }).ConstructFunctionParameters(null);

            Assert.IsNull(actual);
        }
コード例 #4
0
ファイル: StretchrRequestTest.cs プロジェクト: n3xes/Stretchr
        public void ConstructFunctionParametersTestMultiple()
        {
            const String KEY1 = "key1";
            const String KEY2 = "key2";
            const String KEY3 = "key3";
            const String KEY4 = "key4";

            IList<String> aggregationFunctionParameters = new List<String>();
            aggregationFunctionParameters.Add(KEY1);
            aggregationFunctionParameters.Add(KEY2);
            aggregationFunctionParameters.Add(KEY3);
            aggregationFunctionParameters.Add(KEY4);

            const String EXPECTED = "key1,key2,key3,key4";

            String actual = new StretchrRequest_Accessor<String>(new StretchrClient(), response => { }, (request, statusCode, exception) => { }).ConstructFunctionParameters(aggregationFunctionParameters);

            Assert.AreEqual(EXPECTED, actual);
        }
コード例 #5
0
ファイル: StretchrRequestTest.cs プロジェクト: n3xes/Stretchr
        public void ConstructAggregationFunctionParametersTestNone()
        {
            IList<String> aggregationFunctionParameters = new List<String>();

            String actual = new StretchrRequest_Accessor<String>(new StretchrClient(), response => { }, (request, statusCode, exception) => { }).ConstructAggregationFunctionParameters(aggregationFunctionParameters);

            Assert.IsNull(actual);
        }
コード例 #6
0
ファイル: StretchrRequestTest.cs プロジェクト: n3xes/Stretchr
        public void ConvertStretchrSpecialSystemFieldToStringTestPath()
        {
            const String EXPECTED = "~path";

            String actual = new StretchrRequest_Accessor<String>(new StretchrClient(), response => { }, (request, statusCode, exception) => { }).ConvertStretchrSpecialSystemFieldToString(StretchrSpecialSystemField.Path);

            Assert.AreEqual(EXPECTED, actual);
        }