public void SignTest() { BuildTestBlueprint(); User archy = new Architect("Gustave", "Eiffel", "Gustave1886", "password", DateTime.Now); blueprint1.Sign(archy); portfolio.Add(blueprint1); Assert.AreEqual(blueprint1.GetSignatures().Count, 1); }
public void Sign() { CheckPermission(Permission.CAN_SIGN_BLUEPRINT); blueprint.Sign(session.UserLogged); repository.Modify(blueprint); HasBeenModify = false; }
public void Sign(IBlueprint aBlueprint) { if (!Session.UserLogged.HasPermission(Permission.CAN_SIGN_BLUEPRINT)) { throw new NoPermissionsException(); } aBlueprint.Sign(Session.UserLogged); repository.Modify(aBlueprint); }