blob: 07606d0e123b57518c3fe3b8d13a80c4e026df6e [file] [log] [blame]
Darin Petkov7476a262012-04-12 16:30:46 +02001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "shill/l2tp_ipsec_driver.h"
6
7#include <gtest/gtest.h>
8
9#include "shill/event_dispatcher.h"
10#include "shill/nice_mock_control.h"
11#include "shill/mock_glib.h"
12#include "shill/mock_manager.h"
13#include "shill/mock_metrics.h"
14#include "shill/mock_vpn_service.h"
15
16namespace shill {
17
18class L2TPIPSecDriverTest : public testing::Test {
19 public:
20 L2TPIPSecDriverTest()
21 : manager_(&control_, &dispatcher_, &metrics_, &glib_),
22 driver_(new L2TPIPSecDriver()),
23 service_(new MockVPNService(&control_, &dispatcher_, &metrics_,
24 &manager_, driver_)) {}
25
26 virtual ~L2TPIPSecDriverTest() {}
27
28 protected:
29 NiceMockControl control_;
30 EventDispatcher dispatcher_;
31 MockMetrics metrics_;
32 MockGLib glib_;
33 MockManager manager_;
34 L2TPIPSecDriver *driver_; // Owned by |service_|.
35 scoped_refptr<MockVPNService> service_;
36};
37
38TEST_F(L2TPIPSecDriverTest, GetProviderType) {
39 EXPECT_EQ(flimflam::kProviderL2tpIpsec, driver_->GetProviderType());
40}
41
42} // namespace shill