public void HasUserPermissionShoulReturnNonEmptyCollectionWhenUserHasPermission()
		{
			RDD.Infra.BootStrappers.TestsBootStrapper.ApplicationStart();
			RDD.Infra.BootStrappers.TestsBootStrapper.ApplicationBeginRequest();

			Resolver.Current().Register<ILogService>(() => new LostLogService());

			var instanceUri = new Uri("https://pandora.lucca.local");
			var token = new Guid("fdfc9dbc-c19f-4f85-b9c7-fa32d813b1a5");

			var settings = new ApiSettings(instanceUri, new AuthenticationInfo(AuthenticationType.User, token));

			var service = new v2.PermissionsService(settings);

			var hasPermisson = service.HasUserPermission(22, 1);

			Assert.IsTrue(hasPermisson);
		}
Example #2
0
		public void GetAllShoulReturnNonEmptyCollectionOnSampleLuccaInstance()
		{
			RDD.Infra.BootStrappers.TestsBootStrapper.ApplicationStart();
			RDD.Infra.BootStrappers.TestsBootStrapper.ApplicationBeginRequest();

			Resolver.Current().Register<ILogService>(() => new LostLogService());

			var instanceUri = new Uri("https://sandbox.ilucca-demo.net");
			var token = new Guid("9cba0b77-2991-4443-989f-ebdf3956d4fb");

			var settings = new ApiSettings(instanceUri, new AuthenticationInfo(AuthenticationType.User, token));

			var service = new v2.UsersService(settings);

			var allUsers = service.GetAll();

			Assert.IsNotEmpty(allUsers);
		}