Ejemplo n.º 1
0
        public void TestSavePerson()
        {
            var workflow = new Workflow();
            var person = new Person();

            Assert.IsTrue(workflow.SavePerson(new Person() { Name = "Kevin", Age = 26 }));
        }
Ejemplo n.º 2
0
        public void TestFindAllPeople()
        {
            var workflow = new Workflow();

            workflow.SavePerson(new Person() { Name = "Bubba" });

            Assert.AreNotEqual(0, workflow.FindAllPeople().Count);
        }
Ejemplo n.º 3
0
        public void TestRemovedPersonsShouldNoLongerBeFindable()
        {
            var workflow = new Workflow();

            workflow.SavePerson(new Person() { Name = "Levi"});
            workflow.RemovePerson("Levi");

            Assert.IsNull(workflow.FindPerson("Levi"));
        }
Ejemplo n.º 4
0
        public void TestSavedPersonShouldBeReturnedWithGetPerson()
        {
            var workflow = new Workflow();
            workflow.SavePerson(new Person() { Name = "Alibaba", Age = 46 });
            var person = workflow.FindPerson("Alibaba");

            Assert.IsNotNull(person);
            Assert.AreEqual("Alibaba", person.Name);
            Assert.AreEqual(46, person.Age);
        }