// 

			

	
		
			
					Welcome to MSDN Blogs
Sign in | Join



				
			 | 
			Help
		
	


	
		

	Being Cellfish
	Stuff I wished I've found in some blog (and sometimes did)


	


	RSS 2.0
	Atom 1.0
	


 
 


	
	Home
	About
	Email
	

	
	
		
			

	



	

	Search
	 
	 
	 
		var WLSearchBoxConfiguration=
		{
			"global":{
				"serverDNS":"www.bing.com",
				"market":"en-US"
			},
			"appearance":{
				"autoHideTopControl":false,
				"width":600,
				"height":400,
				"theme":"Blue"
			},
			"scopes":[
				{
					"type":"web",
					"caption":"Being Cellfish",
					"searchParam":"site:blogs.msdn.com/cellfish/"
				}
				,
				{
					"type":"web",
					"caption":"Web",
					"searchParam":""
				}
			]
		}
	 
	 
	




	Tags
	
	
*nix
.Net
Agile
BDD
C++
Christmas
DDD
Development
GUI
Java
Kanban
MFC
Military
Open source
PHP
Python
Relocate
Review
Robot
Ruby
SCX
Security
SQL
TDD
Test
Tools


	



	
News

	System Center Cross Platform Providers Source
2008 Advent Calendar
System Center Cross Platform Extensions Beta

Search:

Search Being Cellfish

Reader survey:

     Please answer one question.

 

  


var gaJsHost = (("https:" == document.location.protocol) ?
"https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js'
type='text/javascript'%3E%3C/script%3E"));


try {
var pageTracker = _gat._getTracker("UA-6828694-1");
pageTracker._trackPageview();
} catch(err) {}




	

Archives


	December 2009 (19)

	November 2009 (8)

	October 2009 (10)

	September 2009 (8)

	August 2009 (17)

	July 2009 (16)

	June 2009 (11)

	May 2009 (13)

	April 2009 (14)

	March 2009 (12)

	February 2009 (12)

	January 2009 (13)

	December 2008 (25)

	November 2008 (11)

	October 2008 (14)

	September 2008 (5)

	August 2008 (8)

	July 2008 (2)

	June 2008 (7)

	May 2008 (6)

	April 2008 (10)






	


		
			
			

.DoNotDisplay { display: none; }





	
		Friday, December 11, 2009 12:11 AM
		cellfish 
		2009 Advent Calendar December 11th 
	
	
		Like yesterday I only have a passing test to add today:   1:     
public class Given_two_transactions_from_the_same_ImportantProvider
   2:      {
   3:          private ImportantProvider _importantProvider;
   4:          private Transaction _transaction1;
   5:          private Transaction _transaction2;
   6:   
   7:          public
Given_two_transactions_from_the_same_ImportantProvider()
   8:          {
   9:              _importantProvider = new ImportantProvider(new
DummyObject());
  10:              _transaction1 = _importantProvider.Transaction;
  11:              _transaction2 = _importantProvider.Transaction;
  12:          }
  13:   
  14:          [Fact]
  15:          void It_should_be_two_different_transactions()
  16:          {
  17:              Assert.NotSame(_transaction1, _transaction2);
  18:          }
  19:   
  20:          [Fact]
  21:          void
It_should_be_the_same_ImportantObject_returned_by_both_transactions()
  22:          {
  23:              Assert.Same(_transaction1.ImportantObject,
_transaction2.ImportantObject);
  24:          }
  25:      }

You might have noticed that the ImportantProvider creates a new lock
for each transaction. That is no good. Tomorrow I'll fix that.
	
	Filed under: Christmas
		



	

Comment Notification

	If you would like to receive an email when updates are made to this
post, please register here
	


	Subscribe to this post's comments using
	RSS





	
	
	Comments


	No Comments

	






Leave a Comment

	Name (required) 
	Your URL (optional)
	
	Comments (required) 
	



    
    
    


      


Enter Code Here: Required

    



	Remember Me?
	





   
    
		
		 
	

	
	

© 2009 Microsoft Corporation. All rights reserved.
Terms of Use  |  
Trademarks  |  
Privacy Statement  














var gTrackEvents=0;
var gDomain="m.webtrends.com";
var gDcsId="dcsrubpmj00000oqcq95ilr3l_8q8i";
var gFpc="WT_FPC";
if(document.cookie.indexOf(gFpc+"=")==-1){document.write("");}







Midi Mime Types SiteMap Contact Subscribe © 2014 JimmyLandStudios