예제 #1
0
 protected override void Initialize()
 {
     _expected = TestData.ScopeAllProperties();
     AdminService.Save(_expected);
     _actual =
         Factory.ScopeStore.TypeFactory().GetScopesAsync().Result.SingleOrDefault(x => x.Name == _expected.Name);
 }
예제 #2
0
        public ScopeStoreTests(PersistenceTestFixture data)
            : base(data)
        {
            _scopeStore     = Factory.Resolve <IScopeStore>();
            _evenScopeNames = new List <string>();
            _oddScopeNames  = new List <string>();
            var scopes = Enumerable.Range(1, 10).Select(x =>
            {
                var scope  = TestData.ScopeAllProperties();
                scope.Name = scope.Name + x;
                if (x % 2 == 0)
                {
                    _evenScopeNames.Add(scope.Name);
                    scope.ShowInDiscoveryDocument = false; //private
                }
                else
                {
                    _oddScopeNames.Add(scope.Name);
                    scope.ShowInDiscoveryDocument = true; //public
                }
                return(scope);
            });

            _setup = Setup(scopes);
        }
 public ScopeSeriailzerAllPropertiesShouldRoundTrip(PersistenceTestFixture data)
     : base(data)
 {
     _expected = TestData.ScopeAllProperties();
     _setup    = Setup();
 }