This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using NUnit.Framework; | |
namespace TennisKataBootstrap | |
{ | |
[TestFixture] | |
public class GameScorer_Tests | |
{ | |
[Test] | |
public void Score_should_return_love_love_when_players_have_played() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using OpenQA.Selenium; | |
using OpenQA.Selenium.Chrome; | |
using OpenQA.Selenium.Support.UI; | |
namespace BEPlayGround1 | |
{ | |
public class Navigation | |
{ | |
private LoginPage _loginPage; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Moq; | |
namespace UrlShortener.Tests | |
{ | |
[TestClass] | |
public class UrlShortener_Tests | |
{ | |
private Shortener _service; | |
private Mock<IShortenerEngine> _engine; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param( | |
[parameter(Mandatory=$true)] | |
[alias("f")] | |
$FilePath, | |
[alias("b")] | |
$BuildTypeId, | |
[alias("s")] | |
$ServerUrl, | |
[parameter()] | |
[alias("o")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace TechTalk.SpecFlow | |
{ | |
public static class SpecFlowExt | |
{ | |
public static IEnumerable<T> CreateSimpleSet<T>(this Table table, string colName = null) | |
{ | |
if (table.Rows.Count == 0) | |
{ | |
throw new ApplicationException("Input table is empty"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reflection; | |
using System.Reflection.Emit; | |
namespace ConsoleApplication1 | |
{ | |
public class AssemblyGenerator | |
{ | |
public static ModuleBuilder CreateModuleBuilder(Action<ModuleBuilder> buildTypes, string assemblyName) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
namespace Nullable | |
{ | |
public class Nullable_Test | |
{ | |
public void SumNullableNumbers() | |
{ | |
int?[] numbers = new int?[10]; | |
int sum = numbers.Where(n => n.HasValue).Sum(n => n.Value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void $MethodUnderTest$_should_$EXPECTED_BEHAVIOR$() | |
{ | |
// Arrange | |
$END$ | |
// Act | |
// Assert | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Moq; | |
namespace TestDoubles.Examples.TestSpecificSubclass.ProtectedMember | |
{ | |
[TestClass] | |
public class Player_Test | |
{ | |
[TestMethod] | |
public void Should_be_able_to_roll_die_wtih_max_face_value() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace TestDoubles.Examples.Fake | |
{ | |
[TestClass] | |
public class Invoice_Test | |
{ | |
[TestMethod] |
NewerOlder