Пример #1
0
        public void TestSavePerson()
        {
            var workflow = new Workflow();
            var person = new Person();

            Assert.IsTrue(workflow.SavePerson(new Person() { Name = "Kevin", Age = 26 }));
        }
Пример #2
0
        public void TestFindAllPeople()
        {
            var workflow = new Workflow();

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

            Assert.AreNotEqual(0, workflow.FindAllPeople().Count);
        }
Пример #3
0
        public void TestRemovedPersonsShouldNoLongerBeFindable()
        {
            var workflow = new Workflow();

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

            Assert.IsNull(workflow.FindPerson("Levi"));
        }
Пример #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);
        }