public void Returns_empty_certification_string_for_invalid_deployment()
		{
			MockRepository mocks = new MockRepository();
			IDeploymentSelectionValidator validator = mocks.CreateMock<IDeploymentSelectionValidator>();

			using (mocks.Record())
			{
				Expect.Call(validator.IsValid("845", null)).Return(false);
			}

			using (mocks.Playback())
			{
				ILabelTextGenerator textGenerator = new LabelTextGenerator(validator);
				string text = textGenerator.GetCertificationText("845", null);

				Assert.That(text, Is.EqualTo(string.Empty));
			}

			mocks.VerifyAll();
		}
		public void Generates_certification_label_text()
		{
			Deployment deployment = new Deployment();

			deployment.CertifiedBy = "khurwitz";
			deployment.CertifiedOn = new DateTime(2007, 4, 15, 8, 32, 45);

			MockRepository mocks = new MockRepository();
			IDeploymentSelectionValidator validator = mocks.CreateMock<IDeploymentSelectionValidator>();

			using (mocks.Record())
			{
				Expect.Call(validator.IsValid("845", deployment)).Return(true);
			}

			using (mocks.Playback())
			{
				ILabelTextGenerator textGenerator = new LabelTextGenerator(validator);
				string text = textGenerator.GetCertificationText("845", deployment);

				Assert.That(text, Is.EqualTo("4/15/2007 8:32 AM by khurwitz"));
			}

			mocks.VerifyAll();
		}