public void FileSystemIntellisenseProvider_GetIntellisenseResults_ContextIsNull_ResultCountIsZero() { //------------Execute Test--------------------------- var getResults = new FileSystemIntellisenseProvider().GetIntellisenseResults(null); //------------Assert Results------------------------- Assert.AreEqual(0, getResults.Count); }
public void FileSystemIntellisenseProvider_ExecuteInsertion(int caretPosition, string inputText, string inserted, string expected) { //------------Setup for test-------------------------- var fileSystemIntellisenseProvider = new FileSystemIntellisenseProvider(); //------------Execute Test--------------------------- var context = new IntellisenseProviderContext { CaretPosition = caretPosition, InputText = inputText, IsInCalculateMode = false, DesiredResultSet = IntellisenseDesiredResultSet.ClosestMatch }; var resp = fileSystemIntellisenseProvider.PerformResultInsertion(inserted, context); //------------Assert Results------------------------- Assert.AreEqual(resp, expected); }
static FileSystemIntellisenseProvider CreateIntellisenseProvider() { var intellisenseProvider = new FileSystemIntellisenseProvider { FileSystemQuery = new FileSystemQueryForTest() }; return intellisenseProvider; }
public void FileSystemIntellisenseProvider_PerformResultInsertion_ContextIsNull_ThrowsException() { //------------Setup for test-------------------------- var fileSystemIntellisenseProvider = new FileSystemIntellisenseProvider(); //------------Execute Test--------------------------- fileSystemIntellisenseProvider.PerformResultInsertion("", null); }