Esempio n. 1
0
        public void PerformanceTest()
        {
            ADGroupScopeToStringTransform transform = new ADGroupScopeToStringTransform();

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

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

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

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

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

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

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

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