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."); }
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."); }