Inheritance: Person
コード例 #1
0
		public void InheritanceTest()
		{
			Client client = new Client();
			Assert.IsFalse(runner.IsValid(client));
			client = new Client(1, 27, "hammett", "100, street", "*****@*****.**", "123", "123");
			Assert.IsTrue(runner.IsValid(client));
		}
コード例 #2
0
		public void GroupValidation()
		{
			Client client = new Client();
			client.Email = "*****@*****.**";
			Assert.IsFalse(runner.IsValid(client));

			Assert.AreEqual(0, runner.GetErrorSummary(client).GetErrorsForProperty("Email").Length);
			Assert.AreEqual(0, runner.GetErrorSummary(client).GetErrorsForProperty("Password").Length);
		}