Example #1
0
        protected override void SetUp()
        {
            this.GroupGuid           = new Guid(TF.GetConfig().Properties["GroupGuid"]);
            this.GroupCn             = TF.GetConfig().Properties["GroupCn"];
            this.GroupSid            = TF.GetConfig().Properties["GroupSid"];
            this.GroupSAMAccountName = TF.GetConfig().Properties["GroupSAMAccountName"];
            this.GroupEmail          = TF.GetConfig().Properties["GroupEmail"];
            this.GroupNotes          = TF.GetConfig().Properties["GroupNotes"];
            this.GroupTokenGroupSid  = TF.GetConfig().Properties["GroupTokenGroupSid"];
            this.GroupMember         = TF.GetConfig().Properties["GroupMember"];
            this.GroupType           = TF.GetConfig().Properties["GroupType"];
            this.GroupScope          = TF.GetConfig().Properties["GroupScope"];
            var mock           = new Mock <IADOperator>();
            var adOperatorInfo = new ADOperatorInfo
            {
                UserLoginName     = TF.GetConfig().Properties["IPDomainUserName"],
                Password          = TF.GetConfig().Properties["IPDomainUserPassword"],
                OperateDomainName = TF.GetConfig().Properties["IPDomainName"],
            };

            mock.Setup(m => m.GetOperatorInfo()).Returns(adOperatorInfo);
            this.IPADOperator = mock.Object;
        }
Example #2
0
        public void FixtureSetUp()
        {
            // Normal
            var mock           = new Mock <IADOperator>();
            var adOperatorInfo = new ADOperatorInfo
            {
                UserLoginName     = TF.GetConfig().Properties["DomainUserName"],
                Password          = TF.GetConfig().Properties["DomainUserPassword"],
                OperateDomainName = TF.GetConfig().Properties["DomainName"],
            };

            mock.Setup(m => m.GetOperatorInfo()).Returns(adOperatorInfo);
            this.ADOperator = mock.Object;
            // Anonymous
            var anonymousMock = new Mock <IADOperator>();

            adOperatorInfo = new ADOperatorInfo
            {
                UserLoginName     = String.Empty,
                Password          = String.Empty,
                OperateDomainName = TF.GetConfig().Properties["DomainName"],
            };
            anonymousMock.Setup(m => m.GetOperatorInfo()).Returns(adOperatorInfo);
            this.AnonymousADOperator = anonymousMock.Object;
            // Large amount
            var largeAmountMock           = new Mock <IADOperator>();
            var largeAmountADOperatorInfo = new ADOperatorInfo
            {
                UserLoginName     = TF.GetConfig().Properties["LargeAmountDomainUserName"],
                Password          = TF.GetConfig().Properties["LargeAmountDomainUserPassword"],
                OperateDomainName = TF.GetConfig().Properties["LargeAmountDomainName"],
            };

            largeAmountMock.Setup(m => m.GetOperatorInfo()).Returns(largeAmountADOperatorInfo);
            this.LargeAmountADOperator = largeAmountMock.Object;
            this.SetUp();
        }