9using System.Collections.Generic;
10using System.ComponentModel.DataAnnotations;
13using System.Threading.Tasks;
15using Microsoft.VisualStudio.TestTools.UnitTesting;
27 _testDIContext = TestDIContextFactory.CreateDefaultContext();
35 TestObject testObject = dataPortal.
Create();
40 actual = testObject.BrokenRulesCollection.Count;
43 Assert.AreEqual(expected, actual);
47 #region Private Helper Classes
51 public static PropertyInfo<string> TestPropertyProperty = RegisterProperty<string>(nameof(TestProperty));
55 public string TestProperty
57 get {
return GetProperty(TestPropertyProperty); }
58 set { SetProperty(TestPropertyProperty, value); }
64 using (BypassPropertyChecks)
66 LoadProperty(TestPropertyProperty,
"Test");
68 BusinessRules.CheckRules();
This is the base class from which most business objects will be derived.
Maintains metadata about a property.
static void Initialize(TestContext testcontext)
void BrokenRulesCollection_ValidTestObject_ReturnsZeroBrokenRules()
Type to carry context information for DI in unit tests
Interface defining the members of the data portal type.
object Create(params object[] criteria)
Called by a factory method in a business class to create a new object, which is loaded with default v...