Пример #1
0
        static protected void Register <T>(String fixtureName, Expression <Func <T, bool> > predicate) where T : class
        {
            T fixture = Context.Set <T>().FirstOrDefault(predicate);

            Fixtures[fixtureName] = fixture;
            TestRepositories.AddFixtureToContext(fixture);
        }
Пример #2
0
        static protected void Add <T>(String fixtureName, T fixture) where T : class
        {
            Fixtures[fixtureName] = fixture;

            Context.Set <T>().Add(fixture);
            TestRepositories.AddFixtureToContext(fixture);
        }