Пример #1
0
        public static void VerifyGeneralSettingsIOProviderWasRead(Mock <IFile> provider, int expectedCallCount)
        {
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

            IIOProviderMocks.VerifyIOReadWithStubFile(provider, SettingsFilterExpression, expectedCallCount);
        }
        public static void VerifyGeneralSettingsIOProviderWasRead(Mock <IIOProvider> provider, int expectedCallCount)
        {
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }
            // Using Ordinal since this is used internally for a path
            Expression <Func <string, bool> > filterExpression = (string s) => s.Contains("Microsoft\\PowerToys\\settings.json", StringComparison.Ordinal);

            IIOProviderMocks.VerifyIOReadWithStubFile(provider, filterExpression, expectedCallCount);
        }
Пример #3
0
        public static void VerifyModuleIOProviderWasRead(Mock <IFile> provider, string module, int expectedCallCount)
        {
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

            Expression <Func <string, bool> > filterExpression = ModuleFilterExpression(module);

            IIOProviderMocks.VerifyIOReadWithStubFile(provider, filterExpression, expectedCallCount);
        }
        public static void VerifyModuleIOProviderWasRead(Mock <IIOProvider> provider, string module, int expectedCallCount)
        {
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

            Expression <Func <string, bool> > filterExpression = (string s) => s.Contains(module, StringComparison.Ordinal);

            IIOProviderMocks.VerifyIOReadWithStubFile(provider, filterExpression, expectedCallCount);
        }