<?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-6968447394388455737</id><updated>2012-02-16T14:30:57.046+01:00</updated><category term='AxLINQ'/><title type='text'>Source Vault</title><subtitle type='html'>Thoughts on programming, in Dynamics Ax and C#</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sourcevault.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968447394388455737/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sourcevault.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jesper Jensen</name><uri>http://www.blogger.com/profile/04588977151498588122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6968447394388455737.post-256853594434944208</id><published>2010-03-07T15:22:00.006+01:00</published><updated>2010-03-07T15:45:22.294+01:00</updated><title type='text'>AxUnit Unit Testing framework</title><content type='html'>I'm doing unit testing in my daily work and welcome the SysTest unit testing framework that was provided with Dynamics ax 4.0.&lt;br /&gt;&lt;br /&gt;It works well, but I like the assertion syntax found in NUnit better, so I decided to implement my own extension to the SysTest framework.&lt;br /&gt;&lt;br /&gt;Now you can write assertions like this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="brush: c-sharp;"&gt;    assert.that(actual, is.equalTo(expected));&lt;br /&gt;    assert.that(0.3333, is.equalTo(0.33).within(2).decimals());&lt;br /&gt;    assert.that(actual != null);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I think the syntax makes the test more readable.&lt;br /&gt;&lt;br /&gt;You can download the framework at &lt;a href="http://axunit.codeplex.com/"&gt;Codeplex&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968447394388455737-256853594434944208?l=sourcevault.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sourcevault.blogspot.com/feeds/256853594434944208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sourcevault.blogspot.com/2010/03/axunit-unit-testing-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968447394388455737/posts/default/256853594434944208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968447394388455737/posts/default/256853594434944208'/><link rel='alternate' type='text/html' href='http://sourcevault.blogspot.com/2010/03/axunit-unit-testing-framework.html' title='AxUnit Unit Testing framework'/><author><name>Jesper Jensen</name><uri>http://www.blogger.com/profile/04588977151498588122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6968447394388455737.post-3704885905145132652</id><published>2009-07-29T16:53:00.016+02:00</published><updated>2010-02-07T20:17:13.025+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AxLINQ'/><title type='text'>LINQ inside X++ ?</title><content type='html'>&lt;div&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;LINQ (Language INtegrated Query) in C# is simply a work of art.&amp;nbsp;&lt;/div&gt;&lt;div&gt;It's a good example of "Less is more".&lt;/div&gt;&lt;div&gt;With a few lines of code you can express an otherwise complex operation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;In X++ something similar can be done with queries in sql tables, but not in an Array og List object.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;As a hobby project, I created a small Domain Specific Language called "AxLINQ", that can make this possible.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Example (C#)&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;List&amp;lt;string&amp;gt;&lt;string&gt; names &lt;/string&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;= &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;new List&amp;lt;string&amp;gt;&lt;string&gt;();&lt;br /&gt;&lt;/string&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;var &lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;query &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;= &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;from name in names&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;                     &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;order by name &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;                     &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;select "Name: " + name;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Example (X++)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new', fantasy;"&gt;str&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;               &lt;/span&gt;name;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;Array &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;         &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;names&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;= &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;new Array(Types::String);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;AxLINQ_IQueryable &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;axQuery =&lt;span class="Apple-style-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;xfrom(name).in(names)&lt;span class="Apple-style-span" style="font-family: Georgia, fantasy;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt; &lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, fantasy;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;                            &lt;/span&gt;.orderBy(name)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;                        &lt;span class="Apple-style-span" style="font-family: Georgia, fantasy; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="font-family: Georgia, fantasy;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt; &lt;span class="Apple-tab-span" style="white-space: pre;"&gt;   &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new';"&gt;.select("Name: " + name);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The axQuery object can give you an enumerator, to enumerate the ordered list of names. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5363915713844575122" src="http://2.bp.blogspot.com/_PoJ-kQzUQR0/SnB07CjXe5I/AAAAAAAAAAc/cB2DxJv6Hck/s400/screenshot.jpg" style="cursor: hand; cursor: pointer; height: 306px; width: 400px;" /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;AxLINQ implements the standard operators of SELECT, WHERE, ORDER BY, GROUP BY, JOIN and several other functions like DISTINCT, ANY, COUNT, MAX, MIN etc.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Download and try for yourself&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you wish to try it out, you can download the framework at &lt;a href="http://axlinq.codeplex.com/"&gt;http://axlinq.codeplex.com&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6968447394388455737-3704885905145132652?l=sourcevault.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sourcevault.blogspot.com/feeds/3704885905145132652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sourcevault.blogspot.com/2009/07/linq-inside-x.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6968447394388455737/posts/default/3704885905145132652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6968447394388455737/posts/default/3704885905145132652'/><link rel='alternate' type='text/html' href='http://sourcevault.blogspot.com/2009/07/linq-inside-x.html' title='LINQ inside X++ ?'/><author><name>Jesper Jensen</name><uri>http://www.blogger.com/profile/04588977151498588122</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_PoJ-kQzUQR0/SnB07CjXe5I/AAAAAAAAAAc/cB2DxJv6Hck/s72-c/screenshot.jpg' height='72' width='72'/><thr:total>1</thr:total></entry></feed>
