blob: 8c225eaf594788a9d491298ca6d0046cc7b4a65f [file] [log] [blame]
// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <gmock/gmock.h>
#include "cros-disks/format_manager.h"
#include "cros-disks/mock_platform.h"
#include "cros-disks/platform.h"
#include <gtest/gtest.h>
namespace cros_disks {
class FormatManagerTest : public ::testing::Test {
protected:
MockPlatform platform_;
FormatManager manager_{&platform_, nullptr};
};
TEST_F(FormatManagerTest, GetFormatProgramPath) {
EXPECT_EQ("", manager_.GetFormatProgramPath("nonexistent-fs"));
}
TEST_F(FormatManagerTest, IsFilesystemSupported) {
EXPECT_TRUE(manager_.IsFilesystemSupported("vfat"));
EXPECT_TRUE(manager_.IsFilesystemSupported("exfat"));
EXPECT_TRUE(manager_.IsFilesystemSupported("ntfs"));
EXPECT_FALSE(manager_.IsFilesystemSupported("nonexistent-fs"));
}
} // namespace cros_disks