Statistics
| Branch: | Revision:

root / trunk / Pithos.Core.Test / PithosWorkflowTest.cs @ 5ce54458

History | View | Annotate | Download (1.3 kB)

1
using System;
2
using System.Collections.Generic;
3
using System.IO;
4
using System.Linq;
5
using System.Text;
6
using NUnit.Framework;
7
using Pithos.Interfaces;
8

    
9
namespace Pithos.Core.Test
10
{
11
    [TestFixture]
12
    public class PithosWorkflowTest
13
    {
14
        private MockSettings _settings;
15
        private MockStatusChecker _statusChecker;
16

    
17
        [SetUp]
18
        public void SetUp()
19
        {
20
            _settings = new MockSettings
21
                            {
22
                                PithosPath = @"e:\Pithos",
23
                                IconsPath = @"C:\Program Files\Common Files\TortoiseOverlays\icons\XPStyle"
24
                            };
25
            _statusChecker = new MockStatusChecker {Settings = _settings};
26
        }
27

    
28
        [Test]
29
        public void TestSendNotificationForFile()
30
        {
31
            IPithosWorkflow workflow = new PithosWorkflow {Settings = _settings, StatusKeeper = _statusChecker};
32
            var path = @"e:\pithos\0File.txt";
33

    
34
            Assert.DoesNotThrow(() =>
35
                                    {
36
                                        NativeMethods.RaiseChangeNotification(path);
37
                                    });
38
            path = @"e:\pithos\01New folder";
39
            Assert.DoesNotThrow(() => NativeMethods.RaiseChangeNotification(path));
40

    
41
        }
42

    
43

    
44
    }
45
}