상속: IIntellisenseProvider
 public void CalculateIntellisenseProvider_Dispose_IntellisenseResultIsNullified()
 {
     var calculateIntellisenseProvider = new CalculateIntellisenseProvider();
     int countBeforeDispose = calculateIntellisenseProvider.IntellisenseResult.Count;
     calculateIntellisenseProvider.Dispose();
     Assert.AreEqual(175, countBeforeDispose);
     Assert.AreEqual(null, calculateIntellisenseProvider.IntellisenseResult);
 }
        CalculateIntellisenseProvider GetCalculateProvider(bool hasEventLogs)
        {
            var syntaxBuilderMock = new Mock<ISyntaxTreeBuilderHelper>();
            syntaxBuilderMock.SetupGet(p => p.HasEventLogs).Returns(hasEventLogs);
            syntaxBuilderMock.SetupGet(p => p.EventLog).Returns(new EventLogParser());

            var calculateIntellisenseProvider = new CalculateIntellisenseProvider(syntaxBuilderMock.Object);
            return calculateIntellisenseProvider;
        }
        public void CalculateIntellisenseProvider_PerformResultInsertion_ValidContext_ThrowsException()
        {
            var context = new IntellisenseProviderContext
            {
                CaretPosition = 0,
                InputText = "se",
                IsInCalculateMode = true,
                DesiredResultSet = IntellisenseDesiredResultSet.ClosestMatch
            };

            var calculateIntellisenseProvider = new CalculateIntellisenseProvider();
            calculateIntellisenseProvider.PerformResultInsertion("some string", context);
        }
 public void CalculateIntellisenseProvider_IsOptional_False()
 {
     var calculateIntellisenseProvider = new CalculateIntellisenseProvider();
     Assert.AreEqual(false, calculateIntellisenseProvider.Optional);
 }
 public void CalculateIntellisenseProvider_HandlesResultInsertion_False()
 {
     var calculateIntellisenseProvider = new CalculateIntellisenseProvider();
     Assert.AreEqual(false, calculateIntellisenseProvider.HandlesResultInsertion);
 }
 public void CalculateIntellisenseProvider_GetIntellisenseResults_ProviderContextIsNull_ResultsCountIsZero()
 {
     var calculateIntellisenseProvider = new CalculateIntellisenseProvider();
     IList<IntellisenseProviderResult> results = calculateIntellisenseProvider.GetIntellisenseResults(null);
     Assert.AreEqual(0, results.Count);
 }
        static IIntellisenseProvider GetProvider(string providerName)
        {
            IIntellisenseProvider provider = new DefaultIntellisenseProvider();

            switch(providerName.Trim())
            {
                case "Calculate":
                    provider = new CalculateIntellisenseProvider();
                    break;
                case "File":
                    var fileSystemIntellisenseProvider = new FileSystemIntellisenseProvider { FileSystemQuery = ScenarioContext.Current.Get<IFileSystemQuery>("fileQueryHelper") };
                    provider = fileSystemIntellisenseProvider;
                    ScenarioContext.Current.Add("isFileProvider", true);
                    break;
                case "DateTime":
                    provider = new DateTimeIntellisenseProvider();
                    break;
            }

            return provider;
        }