chromium/storage/browser/file_system/copy_or_move_hook_delegate_composite_unittest.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <array>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <stdexcept>
#include <utility>

#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/functional/callback_forward.h"
#include "base/memory/ptr_util.h"
#include "base/test/bind.h"
#include "storage/browser/file_system/copy_or_move_hook_delegate.h"
#include "storage/browser/file_system/copy_or_move_hook_delegate_composite.h"
#include "storage/browser/file_system/file_system_url.h"
#include "storage/browser/test/mock_copy_or_move_hook_delegate.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"

namespace storage {

namespace {
size_t GetLeadingOK(std::vector<base::File::Error> status) {}
}  // namespace

struct TestParameter {};

class CopyOrMoveHookDelegateCompositeTest
    : public testing::TestWithParam<TestParameter> {};

std::unique_ptr<CopyOrMoveHookDelegate>
CopyOrMoveHookDelegateCompositeTest::BuildComposite(
    TestParameter param,
    MockMethodCall mock_method) {}

std::unique_ptr<CopyOrMoveHookDelegate>
CopyOrMoveHookDelegateCompositeTest::BuildComposite(
    TestParameter param,
    SimpleMockMethodCall mock_method) {}

// This test takes a `delegate`, possibly a composite and calls the
// `to_test_method`. It is assumed that all CopyOrMoveHookDelegate objects are
// of type MockCopyOrMoveDelegate and will have the fitting method mocked
// and checked for exactly one execution. If the objects should fail on the
// method call, they do it with a base::File::Error code given by the test
// parameter.
void CopyOrMoveHookDelegateCompositeTest::TestContinuation(
    MethodToTestCall to_test_method,
    MockMethodCall mock_method) {}

// This test takes a `delegate`, possibly a composite and calls the
// `to_test_method`. It is assumed that all CopyOrMoveHookDelegate objects are
// of type MockCopyOrMoveHookDelegate and will have the fitting method mocked
// and checked for exactly one execution.
void CopyOrMoveHookDelegateCompositeTest::TestSimpleMethod(
    SimpleMethodToTestCall to_test_method,
    SimpleMockMethodCall mock_method) {}

TEST_P(CopyOrMoveHookDelegateCompositeTest, OnBeginProcessFileP) {}

TEST_P(CopyOrMoveHookDelegateCompositeTest, OnBeginProcessDirectoryP) {}

TEST_P(CopyOrMoveHookDelegateCompositeTest, OnProgressP) {}

TEST_P(CopyOrMoveHookDelegateCompositeTest, OnErrorP) {}

TEST_P(CopyOrMoveHookDelegateCompositeTest, OnEndCopyP) {}

TEST_P(CopyOrMoveHookDelegateCompositeTest, OnEndMoveP) {}

TEST_P(CopyOrMoveHookDelegateCompositeTest, OnEndRemoveSourceP) {}

INSTANTIATE_TEST_SUITE_P();

}  // namespace storage