예제 #1
0
        public void OneReference()
        {
            const string Code = @"class A {
	void B() {
		resMgr.GetString(""TestKey"");
	}
}";
            SpecificResourceReferenceFinder finder = CreateFinder();

            Assert.AreEqual(44, finder.GetNextPossibleOffset("a.cs", Code, -1), "Incorrect offset.");
            Assert.AreEqual(-1, finder.GetNextPossibleOffset("a.cs", Code, 44), "Incorrect offset.");
        }
예제 #2
0
        public void NoReference()
        {
            const string Code = @"class A {
	void B() {
		DoSomething();
	}
}";
            SpecificResourceReferenceFinder finder = CreateFinder();

            Assert.AreEqual(-1, finder.GetNextPossibleOffset("a.cs", Code, -1), "Incorrect offset.");
        }