예제 #1
0
        public void PerformanceTest()
        {
            ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform();

            UnitTestControl.PerformanceTest(() =>
            {
                Assert.AreEqual("Global", transform.TransformValue(-2147483646).First());
            }, 700000);
        }
예제 #2
0
        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);
        }
예제 #3
0
 public ADGroupScopeToStringTransformViewModel(ADGroupScopeToStringTransform model)
     : base(model)
 {
     this.model = model;
 }
예제 #4
0
        private void ExecuteTest(ADGroupScopeToStringTransform transform, long sourceValue, string expectedValue)
        {
            string outValue = transform.TransformValue(sourceValue).FirstOrDefault() as string;

            Assert.AreEqual(expectedValue, outValue);
        }
예제 #5
0
        public void TestDistributionUniversal()
        {
            ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform();

            this.ExecuteTest(transform, 8, "Universal");
        }
예제 #6
0
        public void TestDistributionDomainLocal()
        {
            ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform();

            this.ExecuteTest(transform, 4, "DomainLocal");
        }
예제 #7
0
        public void TestDistributionGlobal()
        {
            ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform();

            this.ExecuteTest(transform, 2, "Global");
        }
예제 #8
0
        public void TestSecurityUniversal()
        {
            ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform();

            this.ExecuteTest(transform, -2147483640, "Universal");
        }
예제 #9
0
        public void TestSecurityDomainLocal()
        {
            ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform();

            this.ExecuteTest(transform, -2147483644, "DomainLocal");
        }
예제 #10
0
        public void TestSecurityGlobal()
        {
            ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform();

            this.ExecuteTest(transform, -2147483646, "Global");
        }