public void PerformanceTest() { ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform(); UnitTestControl.PerformanceTest(() => { Assert.AreEqual("Global", transform.TransformValue(-2147483646).First()); }, 700000); }
public void TestSerialization() { UniqueIDCache.ClearIdCache(); ADGroupScopeToStringTransform transformToSeralize = new ADGroupScopeToStringTransform(); transformToSeralize.ID = "test001"; UniqueIDCache.ClearIdCache(); ADGroupScopeToStringTransform deserializedTransform = (ADGroupScopeToStringTransform)UnitTestControl.XmlSerializeRoundTrip <Transform>(transformToSeralize); Assert.AreEqual(transformToSeralize.ID, deserializedTransform.ID); }
public ADGroupScopeToStringTransformViewModel(ADGroupScopeToStringTransform model) : base(model) { this.model = model; }
private void ExecuteTest(ADGroupScopeToStringTransform transform, long sourceValue, string expectedValue) { string outValue = transform.TransformValue(sourceValue).FirstOrDefault() as string; Assert.AreEqual(expectedValue, outValue); }
public void TestDistributionUniversal() { ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform(); this.ExecuteTest(transform, 8, "Universal"); }
public void TestDistributionDomainLocal() { ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform(); this.ExecuteTest(transform, 4, "DomainLocal"); }
public void TestDistributionGlobal() { ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform(); this.ExecuteTest(transform, 2, "Global"); }
public void TestSecurityUniversal() { ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform(); this.ExecuteTest(transform, -2147483640, "Universal"); }
public void TestSecurityDomainLocal() { ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform(); this.ExecuteTest(transform, -2147483644, "DomainLocal"); }
public void TestSecurityGlobal() { ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform(); this.ExecuteTest(transform, -2147483646, "Global"); }