Aliyun.OSS.Test.TestClass.ObjectTestClass.ObjectCopyTest.CopyObjectModifiedSincePositiveTest C# (CSharp) Method

CopyObjectModifiedSincePositiveTest() private method

private CopyObjectModifiedSincePositiveTest ( ) : void
return void
        public void CopyObjectModifiedSincePositiveTest()
        {
            var targetObjectKey = OssTestUtils.GetObjectKey(_className);

            var coRequest = new CopyObjectRequest(_bucketName, _sourceObjectKey, _bucketName, targetObjectKey);
            coRequest.ModifiedSinceConstraint = DateTime.Now.AddDays(-1);

            _ossClient.CopyObject(coRequest);
            Assert.IsTrue(OssTestUtils.ObjectExists(_ossClient, _bucketName, targetObjectKey));

            _ossClient.DeleteObject(_bucketName, targetObjectKey);
        }