~mial/ubuntu/oneiric/unity/bug-791810

« back to all changes in this revision

Viewing changes to tests/unit/test-places-place-file-model.vala

Import the work done so far with Compiz

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2010 Canonical Ltd
 
3
 *
 
4
 * This program is free software: you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License version 3 as
 
6
 * published by the Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 * Authored by Neil Jagdish Patel <neil.patel@canonical.com>
 
17
 *
 
18
 */
 
19
using Unity;
 
20
using Unity.Testing;
 
21
using Unity.Places;
 
22
 
 
23
namespace Unity.Tests.Unit
 
24
{
 
25
  public class PlacesPlaceFileModelSuite : Object
 
26
  {
 
27
    public const string DOMAIN = "/Unit/Places/PlaceFileModel";
 
28
 
 
29
    public PlacesPlaceFileModelSuite ()
 
30
    {
 
31
      Logging.init_fatal_handler ();
 
32
 
 
33
      Test.add_data_func (DOMAIN + "/Allocation", test_allocation);
 
34
    }
 
35
 
 
36
    private void test_allocation ()
 
37
    {
 
38
      var model = new PlaceFileModel.with_directory (Config.TESTUNITDIR+"/data");
 
39
      assert (model is PlaceFileModel);
 
40
      assert (model.size == 2);
 
41
    }
 
42
  }
 
43
}