Esempio n. 1
0
        public void ShouldMatchShorter()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("Bo"));
            Assert.IsTrue(nameBase.Matches("B"));
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            var firstName  = new FirstName();
            var lastName   = new LastName();
            var middleName = new MiddleName(firstName);

            //firstName.GetName();
            //firstName.PrintName();

            //lastName.GetName();
            //lastName.PrintName();

            // middleName.GetName();
            // middleName.PrintName();


            var names = new NameBase[] { firstName, lastName, middleName };

            foreach (var name in names)
            {
                name.GetName();
                name.PrintName();
            }


            Console.WriteLine($"Goodbye {firstName.Name} {middleName.Name} {lastName.Name}. Press Enter to Exit.");
            Console.ReadLine();
        }
 // aktualizacja listy pojemników dla wskazanej maszyny
 private void UpdateTubList(string machineName)
 {
     _gui.TubList().Items.Clear();
     foreach (string s in NameBase.TubNames(machineName))
     {
         _gui.TubList().Items.Add(new ListViewItem(s, 0));
     }
 }
Esempio n. 4
0
        public void NameBaseShouldNotMatchWithIncorrectPostAdjectives()
        {
            NameBase nameBase = new NameBase("Bob", "the fourth");

            Assert.IsFalse(nameBase.Matches("Bob the fourth minion"));
            Assert.IsFalse(nameBase.Matches("Bob fourthh"));
            Assert.IsFalse(nameBase.Matches("bob minion fOuRth"));
            Assert.IsFalse(nameBase.Matches("bob minion the fOuR"));
        }
Esempio n. 5
0
        public void NameBaseShouldMatchWithUsedPostAdjectives()
        {
            NameBase nameBase = new NameBase("Bob", "the fourth");

            Assert.IsTrue(nameBase.Matches("Bob the fourth"));
            Assert.IsTrue(nameBase.Matches("Bob fourth"));
            Assert.IsTrue(nameBase.Matches("bob fOuRth"));
            Assert.IsTrue(nameBase.Matches("bob fOuR"));
        }
Esempio n. 6
0
        public void NameBaseAddTestUsingoAuth()
        {
            //Creating the Bill for Add
            NameBase nameBase = QBOHelper.CreateNameBase(qboContextoAuth);
            //Adding the NameBase
            NameBase added = Helper.Add <NameBase>(qboContextoAuth, nameBase);

            //Verify the added NameBase
            QBOHelper.VerifyNameBase(nameBase, added);
        }
Esempio n. 7
0
        public void NameBaseFindbyIdTestUsingoAuth()
        {
            //Creating the NameBase for Adding
            NameBase nameBase = QBOHelper.CreateNameBase(qboContextoAuth);
            //Adding the NameBase
            NameBase added = Helper.Add <NameBase>(qboContextoAuth, nameBase);
            NameBase found = Helper.FindById <NameBase>(qboContextoAuth, added);

            QBOHelper.VerifyNameBase(found, added);
        }
Esempio n. 8
0
        public void NameBaseShouldMatchWithCorrectAdjective()
        {
            NameBase nameBase = new NameBase("Red Bob");

            Assert.IsTrue(nameBase.Matches("Red Bob"));
            Assert.IsTrue(nameBase.Matches("red Bob"));
            Assert.IsTrue(nameBase.Matches("Re Bob"));
            Assert.IsTrue(nameBase.Matches("re Bob"));
            Assert.IsTrue(nameBase.Matches("R Bob"));
            Assert.IsTrue(nameBase.Matches("r Bob"));
            Assert.IsTrue(nameBase.Matches("r b"));
        }
    /// <summary>
    /// Przesuniêcie wybranego pojemnika do wybranej maszyny.
    /// </summary>
    /// <param name="sender">ignorowany, ale raczej bêdzie to przycisk przypisania</param>
    /// <param name="e">ignorowany</param>
    internal void AssignClick(object sender, EventArgs e)
    {
        if (_selectedMachineName == null || _selectedTubName == null)
        {
            return;
        }
        string fromMachineName = (string)NameBase.TubMachine()[_selectedTubName];

        NameBase.TubMachine()[_selectedTubName] = _selectedMachineName;
        UpdateTubList(fromMachineName);
        _gui.AssignButton().Enabled = false;
    }
Esempio n. 10
0
        public void NameBaseUpdateTestUsingoAuth()
        {
            //Creating the NameBase for Adding
            NameBase nameBase = QBOHelper.CreateNameBase(qboContextoAuth);
            //Adding the NameBase
            NameBase added = Helper.Add <NameBase>(qboContextoAuth, nameBase);

            //Change the data of added entity
            QBOHelper.UpdateNameBase(qboContextoAuth, added);
            //Update the returned entity data
            NameBase updated = Helper.Update <NameBase>(qboContextoAuth, added);           //Verify the updated NameBase

            QBOHelper.VerifyNameBase(added, updated);
        }
Esempio n. 11
0
        public void NameBaseDeleteTestUsingoAuth()
        {
            //Creating the NameBase for Adding
            NameBase nameBase = QBOHelper.CreateNameBase(qboContextoAuth);
            //Adding the NameBase
            NameBase added = Helper.Add <NameBase>(qboContextoAuth, nameBase);

            //Delete the returned entity
            try
            {
                NameBase deleted = Helper.Delete <NameBase>(qboContextoAuth, added);
                Assert.AreEqual(EntityStatusEnum.Deleted, deleted.status);
            }
            catch (IdsException ex)
            {
                Assert.Fail();
            }
        }
Esempio n. 12
0
        public void NameBaseVoidTestUsingoAuth()
        {
            //Creating the entity for Adding
            NameBase entity = QBOHelper.CreateNameBase(qboContextoAuth);
            //Adding the entity
            NameBase added = Helper.Add <NameBase>(qboContextoAuth, entity);

            //Void the returned entity
            try
            {
                NameBase voided = Helper.Void <NameBase>(qboContextoAuth, added);
                Assert.AreEqual(EntityStatusEnum.Voided, voided.status);
            }
            catch (IdsException ex)
            {
                Assert.Fail();
            }
        }
Esempio n. 13
0
        static void Main(string[] args)

        {
            var firstName  = new FirstName(); // instiatiatioing
            var middleName = new MiddleName(firstName);
            var lastName   = new LastName();

            var names = new NameBase[] { firstName, lastName, middleName }; // creating an array

            foreach (var name in names)
            {
                name.GetName();
                name.PrintName();
            }


            Console.WriteLine($"Goodbye {firstName.Name} {middleName.Name} {lastName.Name}. Press enter to exit.");
            Console.ReadLine();
        }
Esempio n. 14
0
 public MoveATub2()
 {
     _mediator  = new MoveATubMediator(this);
     Font       = _ui.Font;
     ClientSize = new Size(920, 334);
     foreach (Control c in Boxes())
     {
         Controls.Add(c);
         c.MouseHover += new  System.EventHandler(_mediator.HoverBox);
     }
     Controls.AddRange(new Control[] {
         MachineList(),
         TubList(),
         TubLabel(),
         AssignButton(),
         MachineLabel()
     });
     Text = "Move a Tub";
     foreach (string s in NameBase.MachineNames())
     {
         MachineList().Items.Add(new ListViewItem(s, 0));
     }
 }
Esempio n. 15
0
        public void NameBaseShouldMatchLowerCase()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("bo"));
        }
Esempio n. 16
0
        public void ShouldNotMatchLonger()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsFalse(nameBase.Matches("Bobs"));
        }
Esempio n. 17
0
        public void NameBaseShouldMatchExclaimation()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("bob!"));
        }
Esempio n. 18
0
        public void NameBaseShouldMatchOddCasing()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("bOB"));
        }
Esempio n. 19
0
 public byte GetRating(NameBase nb) {
   byte ret = ScidPINVOKE.IndexEntry_GetRating(swigCPtr, NameBase.getCPtr(nb));
   return ret;
 }
Esempio n. 20
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(NameBase obj) {
   return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
 }
Esempio n. 21
0
 public ushort SetRoundName(NameBase nb, string s) {
   ushort ret = ScidPINVOKE.IndexEntry_SetRoundName(swigCPtr, NameBase.getCPtr(nb), s);
   return ret;
 }
Esempio n. 22
0
 public ushort GetRange(NameBase nbase, string criteria, uint idx, uint count, SWIGTYPE_p_HFilter filter, SWIGTYPE_p_unsigned_int result) {
   ushort ret = ScidPINVOKE.Index_GetRange(swigCPtr, NameBase.getCPtr(nbase), criteria, idx, count, SWIGTYPE_p_HFilter.getCPtr(filter), SWIGTYPE_p_unsigned_int.getCPtr(result));
   if (ScidPINVOKE.SWIGPendingException.Pending) throw ScidPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Esempio n. 23
0
        public void ShouldMatchItself()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("Bob"));
        }
Esempio n. 24
0
 public string GetRoundName(NameBase nb) {
   string ret = ScidPINVOKE.IndexEntry_GetRoundName(swigCPtr, NameBase.getCPtr(nb));
   return ret;
 }
Esempio n. 25
0
        public void NameBaseShouldMatchWithoutAdjective()
        {
            NameBase nameBase = new NameBase("Red Bob");

            Assert.IsTrue(nameBase.Matches("Bob"));
        }
Esempio n. 26
0
 public ushort LoadStandardTags(IndexEntry ie, NameBase nb) {
   ushort ret = ScidPINVOKE.Game_LoadStandardTags(swigCPtr, IndexEntry.getCPtr(ie), NameBase.getCPtr(nb));
   return ret;
 }
Esempio n. 27
0
 public SWIGTYPE_p_SortCache CreateSortCache(NameBase nbase, string criteria) {
   global::System.IntPtr cPtr = ScidPINVOKE.Index_CreateSortCache(swigCPtr, NameBase.getCPtr(nbase), criteria);
   SWIGTYPE_p_SortCache ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_SortCache(cPtr, false);
   return ret;
 }
Esempio n. 28
0
        public void ShouldMatchDefiniteSelf()
        {
            NameBase nameBase = new NameBase("Bob");

            Assert.IsTrue(nameBase.Matches("the Bob"));
        }
Esempio n. 29
0
 public ushort GetBlackElo(NameBase nb) {
   ushort ret = ScidPINVOKE.IndexEntry_GetBlackElo__SWIG_1(swigCPtr, NameBase.getCPtr(nb));
   return ret;
 }
Esempio n. 30
0
 public uint GetRangeLocation(NameBase nbase, string criteria, SWIGTYPE_p_HFilter filter, string text, uint start, bool forward) {
   uint ret = ScidPINVOKE.Index_GetRangeLocation__SWIG_1(swigCPtr, NameBase.getCPtr(nbase), criteria, SWIGTYPE_p_HFilter.getCPtr(filter), text, start, forward);
   if (ScidPINVOKE.SWIGPendingException.Pending) throw ScidPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Esempio n. 31
0
 public uint GetRangeLocation(NameBase nbase, string criteria, SWIGTYPE_p_HFilter filter, uint gnumber) {
   uint ret = ScidPINVOKE.Index_GetRangeLocation__SWIG_0(swigCPtr, NameBase.getCPtr(nbase), criteria, SWIGTYPE_p_HFilter.getCPtr(filter), gnumber);
   if (ScidPINVOKE.SWIGPendingException.Pending) throw ScidPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Esempio n. 32
0
 public ushort ReadEntireFile(NameBase nb, Progress progress) {
   ushort ret = ScidPINVOKE.Index_ReadEntireFile(swigCPtr, NameBase.getCPtr(nb), Progress.getCPtr(progress));
   if (ScidPINVOKE.SWIGPendingException.Pending) throw ScidPINVOKE.SWIGPendingException.Retrieve();
   return ret;
 }
Esempio n. 33
0
        public void NameBaseShouldNotMatchWitIncorrectAdjective()
        {
            NameBase nameBase = new NameBase("Red Bob");

            Assert.IsFalse(nameBase.Matches("Blue Bob"));
        }