~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/AddIns/BackendBindings/WixBinding/Test/PackageFiles/NoDiffShownTestFixture.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using ICSharpCode.WixBinding;
 
5
using NUnit.Framework;
 
6
using System;
 
7
using System.Collections.Generic;
 
8
 
 
9
namespace WixBinding.Tests.PackageFiles
 
10
{
 
11
        /// <summary>
 
12
        /// Tests that no diff is shown in the IWixPackageFilesView via
 
13
        /// the WixPackagesFileEditor
 
14
        /// </summary>
 
15
        [TestFixture]
 
16
        public class NoDiffShownTestFixture : PackageFilesTestFixtureBase
 
17
        {
 
18
                List<string> directories;
 
19
 
 
20
                [Test]
 
21
                public void NoDirectorySelected()
 
22
                {
 
23
                        base.InitFixture();
 
24
                        directories = new List<string>();
 
25
                        editor.CalculateDiff();
 
26
                        Assert.IsTrue(view.IsNoDifferencesFoundMessageDisplayed);
 
27
                        Assert.AreEqual(1, directories.Count);
 
28
                        Assert.AreEqual(@"C:\Projects\Test\bin", directories[0]);
 
29
                }
 
30
                
 
31
                public override string[] GetFiles(string path)
 
32
                {
 
33
                        directories.Add(path);
 
34
                        return new string[] {@"license.rtf"};
 
35
                }
 
36
 
 
37
                protected override string GetWixXml()
 
38
                {
 
39
                        return "<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>\r\n" +
 
40
                                "\t<Product Name='Test' \r\n" +
 
41
                                "\t         Version='1.0' \r\n" +
 
42
                                "\t         Language='1013' \r\n" +
 
43
                                "\t         Manufacturer='#develop' \r\n" +
 
44
                                "\t         Id='????????-????-????-????-????????????'>\r\n" +
 
45
                                "\t\t<Package/>\r\n" +
 
46
                                "\t\t<Directory Id='TARGETDIR' SourceName='SourceDir'>\r\n" +
 
47
                                "\t\t\t<Directory Id='ProgramFilesFolder' Name='PFiles'>\r\n" +
 
48
                                "\t\t\t\t<Directory Id='INSTALLDIR' Name='YourApp' LongName='Your Application'>\r\n" +
 
49
                                "\t\t\t\t\t<Component Id='MyComponent' DiskId='1'>\r\n" +
 
50
                                "\t\t\t\t\t\t<File Id='LicenseFile' Name='license.rtf' Source='bin\\license.rtf' />\r\n" +
 
51
                                "\t\t\t\t\t</Component>\r\n" +
 
52
                                "\t\t\t\t</Directory>\r\n" +
 
53
                                "\t\t\t</Directory>\r\n" +
 
54
                                "\t\t</Directory>\r\n" +
 
55
                                "\t</Product>\r\n" +
 
56
                                "</Wix>";
 
57
                }
 
58
        }
 
59
}