Esempio n. 1
0
		protected override void OnSetUp()
		{
			var prozac = new Product("Prozac");
			var prozacId1 = new ProductIdentifier("12345-2345-11", prozac);
			var prozacId2 = new ProductIdentifier("12345-2345-12", prozac);

			var warfarin = new Product("Warfarin");
			var warfarinId3 = new ProductIdentifier("12345-4321-13", warfarin);

			patient = new Patient("John", "Doe");

			var prozacClaim1 = new Claim(patient, new DateTime(2000, 1, 1), prozacId1);
			var prozacClaim2 = new Claim(patient, new DateTime(2001, 1, 1), prozacId2);
			var warfarinClaim1 = new Claim(patient, new DateTime(2000, 4, 1), warfarinId3);

			using (ISession session = OpenSession())
			{
				using (ITransaction tx = session.BeginTransaction())
				{
					session.Save(prozac);
					session.Save(warfarin);
					session.Save(patient);
					session.Save(prozacClaim1);
					session.Save(prozacClaim2);
					session.Save(warfarinClaim1);

					tx.Commit();
				}
			}
		}
Esempio n. 2
0
 public Claim(Patient patient, DateTime lastFilled, ProductIdentifier productIdentifier)
 {
    this.patient = patient;
    this.lastFilled = lastFilled;
    this.productIdentifier = productIdentifier;
 }