示例#1
0
        public void CompareTo_FoldersAreSameAndSecondFileNameIsLessThanFirstFileName_ReturnsPlusOne()
        {
            CreateProject(@"d:\projects\MyProject\MyProject.csproj");
            MvcProjectFile lhs = CreateProjectFile(@"d:\projects\MyProject\Shared\Z.Master");
            MvcProjectFile rhs = CreateProjectFile(@"d:\projects\MyProject\Shared\A.Master");

            int result = lhs.CompareTo(rhs);

            Assert.AreEqual(1, result);
        }
示例#2
0
        public void CompareTo_FileNamesAreSameAndSecondFolderIsGreaterThanFirstFolder_ReturnsMinussOne()
        {
            CreateProject(@"d:\projects\MyProject\MyProject.csproj");
            MvcProjectFile lhs = CreateProjectFile(@"d:\projects\MyProject\A\site.Master");
            MvcProjectFile rhs = CreateProjectFile(@"d:\projects\MyProject\Z\site.Master");

            int result = lhs.CompareTo(rhs);

            Assert.AreEqual(-1, result);
        }
示例#3
0
        public void CompareTo_FileNamesAreTheSame_ReturnsZero()
        {
            CreateProject(@"d:\projects\MyProject\MyProject.csproj");
            MvcProjectFile lhs = CreateProjectFile(@"d:\projects\MyProject\Site.Master");
            MvcProjectFile rhs = CreateProjectFile(@"d:\projects\MyProject\Site.Master");

            int result = lhs.CompareTo(rhs);

            Assert.AreEqual(0, result);
        }