asp.net

This was pretty straightforward but I didn't find it written up anywhere on the web so here goes. What follows is how I addressed testing IPrincipal in ASP.NET MVC using xunit.net Let's start with the test: 1 [Fact] 2 public void changes_password() { 3 //arrange 4 var controller = ObjectFactory.GetInstance<AccountController>(); 5 controller.ControllerContext = new TestControllerContext(); 6 7 //act 8 var result = controller.ChangePassword("password", "p455w0rd", "p455w0rd"); 9 10 //assert 11 var viewResult = Assert.IsType<RedirectToRouteResult>(result); 12 } notice line...

<system.data> <DbProviderFactories> <remove invariant="System.Data.SQLite"/> <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/> </DbProviderFactories> </system.data> this happened to me using subsonic on an x64 machine. adding the x64 binary to /bin and adding the above to my web.config got me sorted.

I have an xunit test project that is using hand-rolled stubs as concrete implementations of interfaces. StructureMap is the DI container I'm using. I was looking at the names of my stubs, and they followed the convention of TestXYZ as the concrete implementation of IXYZ. To use StructureMap from xunit tests, I created a base class for any fact class that wanted to use ObjectFactory. In the base class ctor, I call the bootstrapper's ConfigureStructureMap method. At first I just had a bunch of x.ForRequestedType<IXYZ>().TheDefaultIsConcreteType<TestXYZ>(); because I had only a handful of stubs and I didn't quite grasp how to scan like the...

Check this: "AutoMapper - ASP.NET MVC" on Deran Schilling, Learner. I've been catching up on Deran's posts about his wife's portfolio site. I'm quite enjoying the explanation of his thought process while building out the application. That is all.

I'll be there.

I'll be there.

I've been working with javascript almost since its inception. It was the first language that I ever really hacked in. I remember having to code around document.layers (blecch!), and I've used javascript with a fair amount of success in the past. But lately I've been reading up on jQuery. And I have experienced a profound moment of clarity. Using css selectors to manipulate the DOM is such a simple idea it qualifies as genius in my eyes. Using this along with asp.net mvc is simply a joy. There is no spoon. Spoon boy: Do not try and bend...

Darren Neimke talks about building ajax applications, both with and without a button to intercept...Darren has this way of explaining things in a way that always makes me nod my head in agreement. Thing is, I haven't really had the opportunity recently to hack a lot in asp.net. It's easy to forget with all of the ajax content on the net that essentially, it's just javascript that interacts with asp.net and other web frameworks really well. Thx, Darren.

test HappyMappy

As a thanx you to Sir Wally for kicking me in the butt to start blogging again, I'm linking to a site he told me about called HappyMappy.com that he is involved with. I did a search on sports in the Houston area and was surprised to see "Htowns Arena Theatre" in the results. That's hood, Sir Wally. It makes my mappy happy :P

 
 
 
blog comments powered by Disqus