public void Setup() { fakeDecrypter = new Fakes.StubIDecrypter() { TryDecryptStringStringOut = (string encrypted, out string decrypted) => { decrypted = ""; return(true); }, }; fakeFileReader = new Fakes.StubIFileReader() { TryReadFileStringStringOut = (string path, out string output) => { output = "test"; return(true); } }; sut = new DecryptionDecorator(fakeFileReader, fakeDecrypter); }
public void Setup() { var role = default(UserRoles); fakeSecuritySystem = new Fakes.StubIRoleBasedSecuritySystem() { CheckRightsToReadFileStringUserRoles = (p, r) => { return(true); } }; fakeFileReader = new Fakes.StubIFileReader() { TryReadFileStringStringOut = (string path, out string output) => { output = "test"; return(true); } }; sut = new RoleBasedSecurityDecorator(fakeFileReader, fakeSecuritySystem, role); }