9using System.ComponentModel;
18using TestClass = NUnit.Framework.TestFixtureAttribute;
19using TestInitialize = NUnit.Framework.SetUpAttribute;
20using TestCleanup = NUnit.Framework.TearDownAttribute;
21using TestMethod = NUnit.Framework.TestAttribute;
23using Microsoft.VisualStudio.TestTools.UnitTesting;
35 private const string ID =
"CSLA_TEST";
44 _testDIContext = TestDIContextFactory.CreateDefaultContext();
60 Assert.Fail(
"This property has a backing feild and an exception should of been thrown.");
64 Assert.IsTrue(
true, ex.Message);
79 Assert.Fail(
"This property has a backing feild and an exception should of been thrown.");
83 Assert.IsTrue(
true, ex.Message);
95 Assert.IsTrue(egsv.Id.Equals(
string.Empty));
96 Assert.IsTrue(egsv.MemberBackedId.Equals(
string.Empty));
100 Assert.IsTrue(egsv.MemberBackedIdWithNoRelationshipTypes.Equals(
string.Empty));
101 Assert.Fail(
"This property has a backing feild and an exception should of been thrown.");
105 Assert.IsTrue(
true, ex.Message);
109 Assert.IsFalse(egsv.IsValid, egsv.BrokenRulesCollection.ToString());
113 Assert.IsTrue(ID.Equals(egsv.Id));
116 egsv.MemberBackedId = ID;
117 Assert.IsTrue(ID.Equals(egsv.MemberBackedId));
122 egsv.MemberBackedIdWithNoRelationshipTypes = ID;
123 Assert.IsTrue(ID.Equals(egsv.MemberBackedIdWithNoRelationshipTypes));
127 Assert.IsTrue(
true, ex.Message);
131 Assert.IsFalse(egsv.IsValid, egsv.BrokenRulesCollection.ToString());
static EditableGetSetRuleValidation NewEditableGetSetValidation(IDataPortal< EditableGetSetRuleValidation > dataPortal)
System.String MemberBackedIdWithNoRelationshipTypes
void CheckValidationRulesOnProperties()
static void ClassInitialize(TestContext context)
void InvalidGetValidationRulesOnProperties()
void InvalidSetValidationRulesOnProperties()
Type to carry context information for DI in unit tests
Interface defining the members of the data portal type.