Skip to content

Instantly share code, notes, and snippets.

View Andrea's full-sized avatar
🦦

Andrea Andrea

🦦
View GitHub Profile
@Andrea
Andrea / gist:1253337
Created September 30, 2011 10:08
Roman Numerals
namespace RommanNumeralsKata
{
using System.Collections.Generic;
using System.Linq;
using Xunit;
using Xunit.Extensions;
public class RommanNumeralsTests2
{
[Theory]
@Andrea
Andrea / gist:1253490
Created September 30, 2011 11:29
Roman Numerals in class
namespace RommanNumeralsKata
{
using System.Collections.Generic;
using System.Linq;
using Xunit;
using Xunit.Extensions;
public class NumberConverter
{
private static Dictionary<char, int> RommanNumeralValues;
public class MyMessyClass
{
private IEnvironemnt _environment;
public MyMessyClass(IEnvironemnt environment)
{
_environment = environment;
}
public void Blah()
@Andrea
Andrea / gist:1779917
Created February 9, 2012 13:25
Virtual vs nonVirtual methods
[TestFixture]
public class MethodsTests
{
private MyClass _class;
/* This test fails
730 121
Expected: True
But was: False
*/
[Test]
@Andrea
Andrea / BackgroundUniverse.cs
Created April 28, 2012 14:52
Backgroound x 9
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using org.flixel;
namespace Test
{
public class UniverseBackground : FlxObject
{
private Texture2D _backgroundTexture;
private readonly FlxObject _player;
@Andrea
Andrea / gist:2780374
Created May 24, 2012 09:09
Raven index
using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using Raven.Client;
using Raven.Client.Document;
using Raven.Client.Indexes;
namespace UsageTests
@Andrea
Andrea / gist:3858525
Created October 9, 2012 12:31
TC exception
Patch is broken, can be found in file: D:\TeamCity\buildAgent\temp\globalTmp\temp359294646098411331patch_25
[13:26:01]Failed to build patch for build #1 {build id=25}, VCS root: https://user@bitbucket.org/MyTeam/myProject.git#master {instance id=7, parent id=5}, due to error: Patch building failed: org.eclipse.jgit.errors.CorruptObjectException: Object 00ba8d5b61e2dbd44d26cb4cd1f6b28d7fdf12eb is corrupt: 'git fetch' command failed. stderr: MyTeam@bitbucket.org:MyTeam/gleed2d.git: session is down jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl$1: Server was not able to build correct patch, most likely due to VCS errors at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.throwError(PatchDownloaderImpl.java:114) at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.checkPatch(PatchDownloaderImpl.java:104) at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.copyPatchAndCheck(PatchDownloaderImpl.java:65) at jetbrains.buildServer.agent.impl.patch.UpdateSourcesPatcherBase.copyP
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="Your.Package.Name">
<uses-sdk />
<application android:label="YourLabel" android:theme="@android:style/Theme.Holo"></application>
//permissions here
</manifest>
public interface Bla
{
void Bloo();
}
internal class Blaaa : Bla
{
public void Bloo()
{
throw new NotImplementedException();
@Andrea
Andrea / StuffThatNeedsToBeValidated.cs
Last active December 24, 2015 09:49
Checking that all public properties in a class are not null
public class StuffThatNeedsToBeValidated
{
public Func<bool> IsAlive { get; set; }
public Func<bool> IsInRunRange { get; set; }
public Func<ReturnCode> RunTowardsTarget { get; set; }
public Func<ReturnCode> Die { get; set; }
}