<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-179387663325319144</id><updated>2012-02-16T11:26:30.957-08:00</updated><category term='Wireless'/><category term='Windows Server 2008'/><category term='Sharepoint 2010 PreReq'/><category term='Nunit'/><category term='Microsoft'/><category term='Feature'/><category term='TypeMock'/><category term='Unit'/><category term='Sharepoint'/><category term='NCover'/><category term='Testing'/><title type='text'>It all comes down to ones and zeros</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.ziggstern.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/179387663325319144/posts/default'/><link rel='alternate' type='text/html' href='http://blog.ziggstern.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>ZiGGstern</name><uri>http://www.blogger.com/profile/10290058267357813958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_oa6rE9nBf8A/S46fGJzrDyI/AAAAAAAAAAM/ZXgnKwhXPHc/S220/ZiGGy.bmp'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-179387663325319144.post-4933912362831056639</id><published>2010-08-06T00:49:00.000-07:00</published><updated>2010-08-06T00:49:27.423-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint 2010 PreReq'/><title type='text'>Sharepoint 2010 PreRqe install fails on SQL Server 2008 R2 Reporting Services Sharepoint 2010 Add-in</title><content type='html'>When installing PreReqs for Sharepoint 2010 i ran into a error message saying: "The tool was unable to download SQL 2008 R2 Reporting Services SharePoint 2010 Add-in."&lt;br /&gt;&lt;br /&gt;After checking that i had internet connection i had to resort to Google to find a fix for the problem and it was quite simple. On this &lt;a href="http://blog.brainlitter.com/archive/2010/05/03/sharepoint-2010-installation-error-%E2%80%93-performing-prerequisites.aspx"&gt;post&lt;/a&gt;&amp;nbsp;I found that you can just download the installer for this addin directly from Microsoft and install it yoursel, and voila, the prereq install goes of without a hitch.&lt;br /&gt;&lt;br /&gt;The link to the download is &lt;a href="http://go.microsoft.com/fwlink/?LinkID=166379"&gt;http://go.microsoft.com/fwlink/?LinkID=166379&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/179387663325319144-4933912362831056639?l=blog.ziggstern.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ziggstern.com/feeds/4933912362831056639/comments/default' title='Legg inn kommentarer'/><link rel='replies' type='text/html' href='http://blog.ziggstern.com/2010/08/sharepoint-2010-prerqe-install-fails-on.html#comment-form' title='0 Kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/179387663325319144/posts/default/4933912362831056639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/179387663325319144/posts/default/4933912362831056639'/><link rel='alternate' type='text/html' href='http://blog.ziggstern.com/2010/08/sharepoint-2010-prerqe-install-fails-on.html' title='Sharepoint 2010 PreRqe install fails on SQL Server 2008 R2 Reporting Services Sharepoint 2010 Add-in'/><author><name>ZiGGstern</name><uri>http://www.blogger.com/profile/10290058267357813958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_oa6rE9nBf8A/S46fGJzrDyI/AAAAAAAAAAM/ZXgnKwhXPHc/S220/ZiGGy.bmp'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-179387663325319144.post-5732249552080590048</id><published>2010-07-05T02:28:00.000-07:00</published><updated>2010-07-05T02:30:21.699-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Wireless'/><category scheme='http://www.blogger.com/atom/ns#' term='Feature'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows Server 2008'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft'/><title type='text'>Getting wireless networks going in Windows Server 2008 R2</title><content type='html'>This one had me stuck for a while as Microsoft doesnt see fit to give any indication as to why no wireless networks are showing even thou you have installed the wirless card drivers and the adapter shows in the Network and Shareing center. The fix is realy quite simple; just add the feature Wireless Lan Service in your Server Manager under Features.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/179387663325319144-5732249552080590048?l=blog.ziggstern.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ziggstern.com/feeds/5732249552080590048/comments/default' title='Legg inn kommentarer'/><link rel='replies' type='text/html' href='http://blog.ziggstern.com/2010/07/getting-wireless-networks-going-in.html#comment-form' title='0 Kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/179387663325319144/posts/default/5732249552080590048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/179387663325319144/posts/default/5732249552080590048'/><link rel='alternate' type='text/html' href='http://blog.ziggstern.com/2010/07/getting-wireless-networks-going-in.html' title='Getting wireless networks going in Windows Server 2008 R2'/><author><name>ZiGGstern</name><uri>http://www.blogger.com/profile/10290058267357813958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_oa6rE9nBf8A/S46fGJzrDyI/AAAAAAAAAAM/ZXgnKwhXPHc/S220/ZiGGy.bmp'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-179387663325319144.post-3287638233990155778</id><published>2010-03-03T11:12:00.000-08:00</published><updated>2010-03-03T14:29:09.921-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Nunit'/><category scheme='http://www.blogger.com/atom/ns#' term='Sharepoint'/><category scheme='http://www.blogger.com/atom/ns#' term='Unit'/><category scheme='http://www.blogger.com/atom/ns#' term='NCover'/><category scheme='http://www.blogger.com/atom/ns#' term='TypeMock'/><title type='text'>Unit-testing Sharepoint</title><content type='html'>For some time now I've been wanting to try my hand in unit-testing, but as I'm primarily working on Sharepoint projects I’ve not had the guts to try decoupling and mocking those pesky API bits. Last week thou I finally worked up the courage to give it a go. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When I set out, my sole experience with unit-testing was a former co-worker of mine giving an in-house talk about the subject about a year ago. So this blog entry will obviously not contain any groundbreaking tips and tricks in that field. But I do think I can help some of those, starting to unit-test Sharepoint, a quick push in the right direction.&lt;br /&gt;&lt;br /&gt;As I started, I determined that I would try to get decent code coverage on one simple web-part project that I had recently done, and I picked one that would test out some of the trickier bits to mock and decouple. A workmate who had tried his hand at this before pointed me in the direction of TypeMock as a mocking tool, and I decided to try using the integrated Test-Project template in Visual Studio 2008. That last bit was my first fail of quite a few in this project. Little did I know that mstest.exe, the file used to run Visual Studios tests, was made in 32-bit and 32-bit only. Being a happy camper that day I set my test project to “x64” instead of “Any CPU” as by default, after getting quite a few errors and having to resort to good old Google for answers. That landed got me on the right track again. Enter NUnit…..&lt;br /&gt;&lt;br /&gt;My final solution was to use the combination of NUnit, TypeMock and NCover. I’m sure there are other options that are equally good, but my choice fell on these three. &lt;br /&gt;&lt;br /&gt;Dropping the test-project that I had added to my solution using the Test-Project template from Visual Studio, I proceeded to add a standard Class-Library project, including the NUnit framework and the project under test as references. All that was left of the setup-process was to set the test-project as startup-project and setting NUnit as “Start external program” under the Debug tab under project properties, with the test-projects assembly as an argument.&lt;br /&gt;&lt;br /&gt;Now when I run the debugging by pressing “F5”, NUnit pops up and if I set breakpoint in the test code, I’m able to step through the running of the tests. &lt;br /&gt;&lt;br /&gt;Now that I had the environment set up as good as I could, I went about the first order of business, writing tests. I had already done some ground-work by using MVC pattern for the webpart, dividing the code into view, logic and data layers. My first obstacle was getting around the “SPContext” object.&lt;br /&gt;&lt;br /&gt;Several places in the code I had used this to get either the webID, or the username of current user and things like that. When running my tests I needed to get a around this object being missing. That’s where TypeMock comes into the picture. I simply used the Isolate.WhenCalled().WillReturn() method.&lt;br /&gt;&lt;br /&gt;If I needed the context of my SharepointTest-instance. I could simply create a new SPSite object using the new SPSite(“localhost url”). And use the line:&lt;br /&gt;&lt;br /&gt;“Isolate.WhenCalled( () =&amp;gt; SPContext.Current).WillRetun(‘the context I had created’);”&lt;br /&gt;&lt;br /&gt;Next in line was the SPSecurity object and code that ran with elevated privileges. Here I found a rather great blog &lt;a href="http://www.atalasoft.com/cs/blogs/dterrell/archive/2009/02/10/mocking-spsecurity-delegates.aspx"&gt;entry&lt;/a&gt; from a blog named “&lt;a href="http://www.atalasoft.com/cs/blogs/dterrell/default.aspx"&gt;If you build it, They will come&lt;/a&gt;”. &lt;br /&gt;&lt;br /&gt;Using the TypeMock Mockmanager and mocking the RunWithElevatedPrivileges-method, we can extract the delegate and invoke it. Quite clever, I would never have come up with something like that by myself. &lt;br /&gt;&lt;br /&gt;This was my first Blogpost and I hope that someone saves some time by reading it. I’ll try to post more as I discover more and learn more.&lt;br /&gt;&lt;br /&gt;ZiGGstern&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/179387663325319144-3287638233990155778?l=blog.ziggstern.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.ziggstern.com/feeds/3287638233990155778/comments/default' title='Legg inn kommentarer'/><link rel='replies' type='text/html' href='http://blog.ziggstern.com/2010/03/unit-testing-sharepoint.html#comment-form' title='0 Kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/179387663325319144/posts/default/3287638233990155778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/179387663325319144/posts/default/3287638233990155778'/><link rel='alternate' type='text/html' href='http://blog.ziggstern.com/2010/03/unit-testing-sharepoint.html' title='Unit-testing Sharepoint'/><author><name>ZiGGstern</name><uri>http://www.blogger.com/profile/10290058267357813958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_oa6rE9nBf8A/S46fGJzrDyI/AAAAAAAAAAM/ZXgnKwhXPHc/S220/ZiGGy.bmp'/></author><thr:total>0</thr:total></entry></feed>
