public void SignBlueprintTest()
        {
            initializerWithData();
            Session session = conn.LogIn("architect", "architect", (IUserRepository)repository);
            IRepository <IBlueprint> bpStorage  = new BlueprintRepository();
            BlueprintController      controller = new BlueprintController(session, bpStorage);
            IBlueprint aBlueprint = controller.GetBlueprints().First();

            controller.Sign(aBlueprint);
            Assert.IsTrue(aBlueprint.IsSigned());
        }
コード例 #2
0
        private void ShowSignatures()
        {
            IBlueprint selected = (Blueprint)blueprintList.SelectedItem;

            if (selected != null)
            {
                if (selected.IsSigned())
                {
                    signaturesList.Show();
                    stateLabel.Text           = "State: SIGNED";
                    signaturesList.DataSource = selected.GetSignatures();
                }
                else
                {
                    signaturesList.Hide();
                    stateLabel.Text = "State: NO SIGNED";
                }
            }
        }