コード例 #1
0
        public void FindByIdTest()
        {
            var model = CreateNewModel();
            var id    = model.Id;

            var entry = CareerServiceContract.FindById(id);

            Assert.NotNull(entry);

            TestHelper.AssertObject(model, entry);
        }
コード例 #2
0
        internal CareerServiceContract CreateNewModel()
        {
            var ignores = ignoreProperties.Split(',');
            var model   = new CareerServiceContract();

            TestHelper.FillRndProperties(model, ignores);

            var saveResult = model.Save();

            Assert.IsTrue(saveResult);
            return(model);
        }
コード例 #3
0
        public void DeleteTest()
        {
            var model = CreateNewModel();
            var id    = model.Id;

            var saveResult = model.Save();

            Assert.IsTrue(saveResult);

            model.Delete();

            var entry = CareerServiceContract.FindById(model.Id);

            Assert.Null(entry);
        }