Skip to content

Instantly share code, notes, and snippets.

using System;
namespace ThirtyDaysOfTDD.UnitTests
{
public class StringUtils
{
public int FindNumberOfOccurences(string sentenceToScan, string characterToScanFor)
{
try
{
using System;
namespace ThirtyDaysOfTDD.UnitTests
{
public class StringUtils
{
public int FindNumberOfOccurences(string sentenceToScan, string characterToScanFor)
{
try
{
using System;
namespace ThirtyDaysOfTDD.UnitTests
{
public class StringUtils
{
public int FindNumberOfOccurences(string sentenceToScan, string characterToScanFor)
{
if (characterToScanFor.Length != 1)
{
using System;
using System.Linq;
using NUnit.Framework;
namespace ThirtyDaysOfTDD.UnitTests
{
[TestFixture]
public class StringUtilsTest
{
[Test]
private StringUtils _stringUtils;
[SetUp]
public void SetupStringUtilTests()
{
_stringUtils = new StringUtils();
}
using System;
using System.Linq;
using NUnit.Framework;
namespace ThirtyDaysOfTDD.UnitTests
{
[TestFixture]
public class StringUtilsTest
{
private StringUtils _stringUtils;
using System;
using System.Linq;
namespace ThirtyDaysOfTDD.UnitTests
{
class OrderService
{
private ICustomerService _customerService;
private ILoggingService _loggingService;
private IOrderDataService _orderDataService;
using System;
using System.Linq;
using NUnit.Framework;
namespace TddStore.UnitTests
{
[TestFixture]
class OrderServiceTests
{
[Test]
[Test]
public void WhenUserPlacesACorrectOrderThenAnOrderNumberShouldBeReturned()
{
//Arrange
var shoppingCart = new ShoppingCart();
shoppingCart.Items.Add(new ShoppingCartItem { ItemId = Guid.NewGuid(), Quantity = 1 });
var customerId = Guid.NewGuid();
var expectedOrderId = Guid.NewGuid();
var orderService = new OrderService();
using System;
namespace TddStore.Core
{
public class OrderService
{
private IOrderDataService _orderDataService;
public OrderService(IOrderDataService orderDataService)
{