Refactor ISqlContext and SqlTemplates
This commit is contained in:
@@ -211,7 +211,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Test]
|
||||
[Ignore("has bugs")]
|
||||
public void Can_Perform_Get_On_UserRepository()
|
||||
{
|
||||
@@ -225,10 +225,10 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
var user = CreateAndCommitUserWithGroup(repository, userGroupRepository, unitOfWork);
|
||||
|
||||
// Act
|
||||
var updatedItem = repository.Get(user.Id);
|
||||
|
||||
// fixme
|
||||
// this test cannot work, user has 2 sections but the way it's created,
|
||||
var updatedItem = repository.Get(user.Id);
|
||||
|
||||
// fixme
|
||||
// this test cannot work, user has 2 sections but the way it's created,
|
||||
// they don't show, so the comparison with updatedItem fails - fix!
|
||||
|
||||
// Assert
|
||||
@@ -248,7 +248,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
CreateAndCommitMultipleUsers(repository, unitOfWork);
|
||||
|
||||
// Act
|
||||
var query = unitOfWork.Query<IUser>().Where(x => x.Username == "TestUser1");
|
||||
var query = unitOfWork.SqlContext.Query<IUser>().Where(x => x.Username == "TestUser1");
|
||||
var result = repository.GetByQuery(query);
|
||||
|
||||
// Assert
|
||||
@@ -329,7 +329,7 @@ namespace Umbraco.Tests.Persistence.Repositories
|
||||
var users = CreateAndCommitMultipleUsers(repository, unitOfWork);
|
||||
|
||||
// Act
|
||||
var query = unitOfWork.Query<IUser>().Where(x => x.Username == "TestUser1" || x.Username == "TestUser2");
|
||||
var query = unitOfWork.SqlContext.Query<IUser>().Where(x => x.Username == "TestUser1" || x.Username == "TestUser2");
|
||||
var result = repository.Count(query);
|
||||
|
||||
// Assert
|
||||
|
||||
Reference in New Issue
Block a user