Esempio n. 1
0
 public ContextFixture()
 {
     Database.SetInitializer <DbTest>(new DropCreateDatabaseAlways <DbTest>());
     Context = new DbTest();
     Context.Database.Initialize(true);
     GeneX.Security.Test.Migrations.Configuration configuration = new GeneX.Security.Test.Migrations.Configuration();
     configuration.ContextType = typeof(DbTest);
     configuration.SeedData(Context);
 }
Esempio n. 2
0
        void GetOrganizationsAsyncDoesNotThrow(Guid id)
        {
            // arrange
            User u = new User {
                Id = id
            };
            DbTest context = fixture.Context;

            UserStore us = new UserStore(context);

            // act
            var ex = Record.ExceptionAsync(() => us.GetOrganizationsAsync(u));

            // assert
            Assert.Null(ex.Exception);
        }