示例#1
0
        public void LineTest()
        {
            FileLineMatch target = new FileLineMatch(MatchType.After, "the matching line", 4,
                                                     new FileSpec(new DepotPath("//depot/..."), new Revision(2)));
            string expected = "here is a line";
            string actual;

            target.Line = expected;
            actual      = target.Line;
            Assert.AreEqual(expected, actual);
        }
示例#2
0
        public void TypeTest()
        {
            FileLineMatch target = new FileLineMatch(MatchType.After, "the matching line", 4,
                                                     new FileSpec(new DepotPath("//depot/..."), new Revision(2)));
            MatchType expected = MatchType.Before;
            MatchType actual;

            target.Type = expected;
            actual      = target.Type;
            Assert.AreEqual(expected, actual);
        }
示例#3
0
        public void LineNumberTest()
        {
            FileLineMatch target = new FileLineMatch(MatchType.After, "the matching line", 4,
                                                     new FileSpec(new DepotPath("//depot/..."), new Revision(2)));
            int expected = 1999;
            int actual;

            target.LineNumber = expected;
            actual            = target.LineNumber;
            Assert.AreEqual(expected, actual);
        }
示例#4
0
        public void FileSpecTest()
        {
            FileLineMatch target = new FileLineMatch(MatchType.After, "the matching line", 4,
                                                     new FileSpec(new DepotPath("//depot/..."), new Revision(2)));
            FileSpec expected = new FileSpec(new ClientPath("//annotate/..."),
                                             new VersionRange(new LabelNameVersion("my_label"), new LabelNameVersion("my_old_label")));
            FileSpec actual;

            target.FileSpec = expected;
            actual          = target.FileSpec;
            Assert.AreEqual(expected, actual);
        }