Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (27 sloc) 0.891 kb
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using NUnit.Framework;
namespace Simple.Data.SqlCeTest
{
[TestFixture]
public class OrderDetailTests
{
private static readonly string DatabasePath = Path.Combine(
Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase.Substring(8)),
"TestDatabase.sdf");
[Test]
public void TestOrderDetail()
{
var db = Database.OpenFile(DatabasePath);
var order = db.Orders.FindByOrderDate(new DateTime(2010, 8, 11));
IEnumerable<dynamic> orderItems = order.OrderItems;
var orderItem = orderItems.FirstOrDefault();
var item = orderItem.Item;
Assert.AreEqual("Widget", item.Name);
}
}
}
Jump to Line
Something went wrong with that request. Please try again.