Skip to content

Commit cae6384

Browse files
author
jordanqin
committed
fix slim ut
1 parent 1c61b53 commit cae6384

File tree

3 files changed

+60
-36
lines changed

3 files changed

+60
-36
lines changed

QCloudCosXml/cosxml/src/androidTest/java/com/tencent/cos/xml/model/SimpleOtherObjectTest.java

-26
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import com.tencent.cos.xml.model.object.UploadPartRequest;
4646
import com.tencent.cos.xml.model.object.UploadPartResult;
4747
import com.tencent.cos.xml.model.tag.ACLAccount;
48-
import com.tencent.cos.xml.model.tag.Tagging;
4948

5049
import org.junit.Assert;
5150
import org.junit.Test;
@@ -267,31 +266,6 @@ public void onProgress(long complete, long target) {
267266
TestUtils.parseBadResponseBody(completeMultiUploadResult);
268267
}
269268

270-
@Test
271-
public void testTagging(){
272-
Tagging tagging1 = new Tagging();
273-
Tagging.TagSet tagSet1 = new Tagging.TagSet();
274-
Tagging.Tag tag11 = new Tagging.Tag("key1", "value1");
275-
Tagging.Tag tag12 = new Tagging.Tag("key2", "value2");
276-
Tagging.Tag tag13 = new Tagging.Tag("key3", "value3");
277-
tagSet1.addTag(tag11);
278-
tagSet1.addTag(tag12);
279-
tagSet1.addTag(tag13);
280-
tagging1.tagSet = tagSet1;
281-
282-
Tagging tagging2 = new Tagging();
283-
Tagging.TagSet tagSet2 = new Tagging.TagSet();
284-
Tagging.Tag tag21 = new Tagging.Tag("key1", "value1");
285-
Tagging.Tag tag22 = new Tagging.Tag("key2", "value2");
286-
Tagging.Tag tag23 = new Tagging.Tag("key3", "value3");
287-
tagSet2.addTag(tag21);
288-
tagSet2.addTag(tag22);
289-
tagSet2.addTag(tag23);
290-
tagging2.tagSet = tagSet2;
291-
292-
Assert.assertEquals(tagging1, tagging2);
293-
}
294-
295269
private String getBigString(){
296270
StringBuilder sb = new StringBuilder();
297271
for (int i=0;i<100000;i++){

QCloudCosXml/cosxml/src/androidTest/java/com/tencent/cos/xml/common/CosXmlSimpleServiceTest.java QCloudCosXml/cosxml/src/androidTestNormal/java/com/tencent/cos/xml/CosXmlSimpleServiceTest.java

+1-10
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,10 @@
2020
* SOFTWARE.
2121
*/
2222

23-
package com.tencent.cos.xml.common;
23+
package com.tencent.cos.xml;
2424

2525
import androidx.test.ext.junit.runners.AndroidJUnit4;
2626

27-
import com.tencent.cos.xml.CosXmlService;
28-
import com.tencent.cos.xml.CosXmlServiceConfig;
29-
import com.tencent.cos.xml.LogServerProxy;
3027
import com.tencent.cos.xml.core.TestConst;
3128
import com.tencent.cos.xml.core.TestUtils;
3229
import com.tencent.cos.xml.exception.CosXmlClientException;
@@ -45,12 +42,6 @@
4542

4643
import static com.tencent.cos.xml.core.TestUtils.getContext;
4744

48-
/**
49-
*
50-
* <p>
51-
* Created by jordanqin on 2020/12/25.
52-
* Copyright 2010-2020 Tencent Cloud. All Rights Reserved.
53-
*/
5445
@RunWith(AndroidJUnit4.class)
5546
public class CosXmlSimpleServiceTest {
5647
@Test
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* Copyright (c) 2010-2020 Tencent Cloud. All rights reserved.
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in all
12+
* copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
* SOFTWARE.
21+
*/
22+
23+
package com.tencent.cos.xml;
24+
25+
import androidx.test.ext.junit.runners.AndroidJUnit4;
26+
27+
import com.tencent.cos.xml.model.tag.Tagging;
28+
29+
import org.junit.Assert;
30+
import org.junit.Test;
31+
import org.junit.runner.RunWith;
32+
33+
@RunWith(AndroidJUnit4.class)
34+
public class OtherTest {
35+
@Test
36+
public void testTagging(){
37+
Tagging tagging1 = new Tagging();
38+
Tagging.TagSet tagSet1 = new Tagging.TagSet();
39+
Tagging.Tag tag11 = new Tagging.Tag("key1", "value1");
40+
Tagging.Tag tag12 = new Tagging.Tag("key2", "value2");
41+
Tagging.Tag tag13 = new Tagging.Tag("key3", "value3");
42+
tagSet1.addTag(tag11);
43+
tagSet1.addTag(tag12);
44+
tagSet1.addTag(tag13);
45+
tagging1.tagSet = tagSet1;
46+
47+
Tagging tagging2 = new Tagging();
48+
Tagging.TagSet tagSet2 = new Tagging.TagSet();
49+
Tagging.Tag tag21 = new Tagging.Tag("key1", "value1");
50+
Tagging.Tag tag22 = new Tagging.Tag("key2", "value2");
51+
Tagging.Tag tag23 = new Tagging.Tag("key3", "value3");
52+
tagSet2.addTag(tag21);
53+
tagSet2.addTag(tag22);
54+
tagSet2.addTag(tag23);
55+
tagging2.tagSet = tagSet2;
56+
57+
Assert.assertEquals(tagging1, tagging2);
58+
}
59+
}

0 commit comments

Comments
 (0)