Skip to content

Instantly share code, notes, and snippets.

View JakeGinnivan's full-sized avatar
:shipit:

Jake Ginnivan JakeGinnivan

:shipit:
View GitHub Profile
[TestMethod]
public async Task TestLocationSearchHasResult()
{
var testVm = new GeocodeViewModel { SearchText = "Springerstraat Amersfoort Netherlands" };
await Deployment.Current.Dispatcher.InvokeTaskAsync(() => testVm.SearchLocation());
Assert.IsTrue(testVm.MapLocations.Any());
}
public static class DispatcherExtensions
{
public class Foo : IFoo
{
public Foo(string state, ISomeDepedency dep){}
}
public interface IFooFactory
{
IFoo Create(string state);
}
public class DomainClass
{
public DomainClass(AnotherDomainClass dep, string arg){
//logic
}
}
public class AnotherDomainClass{
public AnotherDomainClass(string arg, string arg2){
//ctor logic
private static void BrokenDynamic()
{
IFoo foo = new Foo();
var method = typeof(IFoo).GetMethod("Bar");
string d = "test";
method.Invoke(foo, new[]{d});
}
void Main()
{
var app = Application.LaunchWindows8Application("Microsoft.BingWeather_8wekyb3d8bbwe!App");
var window = app.GetWindows().Single();
OpenAppBar();
window.Get<Hyperlink>("Home_link").Click();
OpenAppBar();
window.Get<Hyperlink>("MyPlaces_link").Click();
var tile = window.Get<GroupBox>("CommonJS_UI_ResponsiveListView_Cluster1_Content_ListView2AddTile");
tile.Click();
var cb = new ContainerBuilder();
cb.RegisterType<Foo>().As<IFoo>().InstancePerLifetimeScope();
cb.RegisterType<Bar>().As<IBar>().InstancePerMatchingLifetimeScope("LifetimeScopeTag");
var container = cb.Build();
using (var scope = container.BeginLifetimeScope("LifetimeScopeTag"))
{
IFoo foo1;
IFoo foo2;
IBar bar1;
public class FooController : Controller{
IService service;
public FooController(IService service){
this.service = service;
}
public ActionResult Bar(){
service.DoStuff();
}
using NUnit.Framework;
using TestStack.BDDfy.Core;
using TestStack.BDDfy.Scanners.StepScanners.Fluent;
namespace TestStack.BDDfy.Samples.Atm
{
[Story(
AsA = "As an Account Holder",
IWant = "I want to withdraw cash from an ATM",
SoThat = "So that I can get money when the bank is closed")]
JetBrains.Util.Tests.TestLoggerListener.TestWrapperException was unhandled by user code
HResult=-2146232832
Message=2 exceptions were thrown.
#1: Cannot get PsiModule
--- EXCEPTION #1/2 [InvalidOperationException]
Message = “Cannot get PsiModule”
ExceptionPath = Root.InnerException
ClassName = System.InvalidOperationException
HResult = COR_E_INVALIDOPERATION=80131509
//CODE CAUSING ISSUES:
foreach (var attribute in sorted.OfType<INamespaceAlias>())
{
attribute.SetResolveContextForSandBox(t, SandBoxContextType.Child);
anchor = t.AddAttributeAfter(attribute, anchor);
}