This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class HtmlActionResult<T> : IHttpActionResult | |
| { | |
| private readonly string _viewTemplate; | |
| private readonly T _model; | |
| public HtmlActionResult(string viewTemplateFullPath, T model) | |
| { | |
| _viewTemplate = File.ReadAllText(viewTemplateFullPath); | |
| _model = model; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class MvcModelBinderTestHelper | |
| { | |
| public static ModelBindingContext FakeModelBindingContext<T>(NameValueCollection formCollection) where T : class | |
| { | |
| var valueProvider = new NameValueCollectionValueProvider(formCollection, null); | |
| var metadata = ModelMetadataProviders.Current.GetMetadataForType(null, typeof(T)); | |
| var bindingContext = new ModelBindingContext | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Register-TabExpansion 'Get-SolutionPackages' @{ | |
| 'PackageName' = { Get-Package | Sort-Object -Property Id -Unique | foreach { $_.Id } } | |
| } | |
| Register-TabExpansion 'Refresh-Package' @{ | |
| 'PackageName' = { Get-Package | Sort-Object -Property Id -Unique | foreach { $_.Id } } | |
| } | |
| function Refresh-Package($PackageName) { | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class SequenceGenerator | |
| { | |
| public static IEnumerable<T> Generate<T>(T initialValue, Func<T, T> generator) | |
| where T : struct | |
| { | |
| var value = initialValue; | |
| while (true) | |
| { | |
| yield return value; | |
| value = generator(value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| internal static class MockHttpMessageHandlerHelper | |
| { | |
| public static void SetupSendAsync(this Mock<HttpMessageHandler> handler, Func<HttpResponseMessage> sendAsyncResultFunc) | |
| { | |
| handler.Protected() | |
| .Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) | |
| .Returns(Task<HttpResponseMessage>.Factory.StartNew(sendAsyncResultFunc)); | |
| } | |
| public static void VerifySendAsync(this Mock<HttpMessageHandler> handler, Times times) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Net; | |
| using System.Text; | |
| using RestSharp; | |
| namespace RestSharpExtensions | |
| { | |
| public static class RestSharpExtensions | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Net; | |
| using System.Text; | |
| using RestSharp; | |
| namespace RestSharpExtensions | |
| { | |
| internal static class RestSharpExtensions | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Resources; | |
| using System.Web.Mvc; | |
| using FluentValidation.Results; | |
| namespace Helpers | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace AutoFixtureExtensions | |
| { | |
| using Ploeh.AutoFixture; | |
| using Ploeh.AutoFixture.AutoMoq; | |
| using Ploeh.AutoFixture.Kernel; | |
| public class SpecificArgumentsConstructorQuery : IMethodQuery | |
| { | |
| private readonly Type[] _types; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | |
| <s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=2042F55FFF64F8489A3078E18B77EF16/@KeyIndexDefined">True</s:Boolean> | |
| <s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=2042F55FFF64F8489A3078E18B77EF16/Shortcut/@EntryValue">test</s:String> | |
| <s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=2042F55FFF64F8489A3078E18B77EF16/Description/@EntryValue">Creates NUnit test</s:String> | |
| <s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=2042F55FFF64F8489A3078E18B77EF16/Text/@EntryValue">[Test]
 | |
| public void $MethodName$()
 | |
| {
 | |
| // assign
 | |
| $END$
 | |
| 
 |