17 lines
637 B
C#
17 lines
637 B
C#
namespace pgLabII.PgUtils.Tests;
|
|
|
|
public class AclParserTests
|
|
{
|
|
[Theory]
|
|
[InlineData("foo=rw/postgres", "foo", "rw", "postgres")]
|
|
[InlineData("\"Test\"\"=\"=rw/postgres", "Test\"=", "rw", "postgres")]
|
|
[InlineData("foo=rw/\"Test\"\"=\"", "foo", "rw", "Test\"=")]
|
|
public void Test1(string aclString, string expectedGrantee, string expectedRights, string expectedGrantor)
|
|
{
|
|
AclParser parser = new();
|
|
Acl acl = parser.Parse(aclString);
|
|
Assert.Equal(expectedGrantee, acl.Grantee);
|
|
Assert.Equal(expectedRights, acl.Rights);
|
|
Assert.Equal(expectedGrantor, acl.Grantor);
|
|
}
|
|
}
|