fixes tests

This commit is contained in:
Shannon
2017-06-29 12:31:23 +10:00
parent 225cf8f8f5
commit abb393c335
2 changed files with 4 additions and 4 deletions

View File

@@ -59,9 +59,9 @@ namespace Umbraco.Tests.Services
//assert
Assert.AreEqual(3, permissions.Count());
Assert.AreEqual(18, permissions.ElementAt(0).AssignedPermissions.Count());
Assert.AreEqual(18, permissions.ElementAt(1).AssignedPermissions.Count());
Assert.AreEqual(18, permissions.ElementAt(2).AssignedPermissions.Count());
Assert.AreEqual(17, permissions.ElementAt(0).AssignedPermissions.Count());
Assert.AreEqual(17, permissions.ElementAt(1).AssignedPermissions.Count());
Assert.AreEqual(17, permissions.ElementAt(2).AssignedPermissions.Count());
}
[Test]

View File

@@ -104,7 +104,7 @@ namespace Umbraco.Tests.Web.Controllers
var userServiceMock = Mock.Get(helper.UmbracoContext.Application.Services.UserService);
var users = MockedUser.CreateMulipleUsers(10);
long outVal = 10;
userServiceMock.Setup(service => service.GetAll(It.IsAny<long>(), It.IsAny<int>(), out outVal, It.IsAny<string>(), It.IsAny<Direction>(), It.IsAny<UserState?>(), It.IsAny<string[]>(), It.IsAny<string>()))
userServiceMock.Setup(service => service.GetAll(It.IsAny<long>(), It.IsAny<int>(), out outVal, It.IsAny<string>(), It.IsAny<Direction>(), It.IsAny<UserState[]>(), It.IsAny<string[]>(), It.IsAny<string>()))
.Returns(() => users);
//we need to manually apply automapper mappings with the mocked applicationcontext