public void StatusRepository_Add_Should_Insert_Status_And_Set_The_Id()
        {
            var repository = CreateRepositoryUnderTest<StatusRepository>();
            var status = new Status
                             {
                                 Description = StatusDescriptionValue
                             };

            Assert.IsTrue(status.Id == 0);

            repository.Add(status);
            repository.Save();

            Assert.IsTrue(status.Id > 0);
        }
        public void StatusRepository_Delete_Should_Delete_Given_Entity_From_DB()
        {
            var repository = CreateRepositoryUnderTest<StatusRepository>();
            var status = new Status
                             {
                                 Description = StatusDescriptionValue
                             };

            Assert.IsTrue(status.Id == 0);

            repository.Add(status);
            repository.Save();
            repository.Delete(status);
            repository.Save();

            Status updatedSheep = repository.GetSingle(x => x.Id == status.Id);

            Assert.IsTrue(updatedSheep == null);
        }
        public void StatusRepository_Edit_On_Existing_Entry_Should_Update_The_DB()
        {
            var repository = CreateRepositoryUnderTest<StatusRepository>();
            var status = new Status
                             {
                                 Description = StatusDescriptionValue
                             };

            Assert.IsTrue(status.Id == 0);

            repository.Add(status);
            repository.Save();
            int returnedId = status.Id;
            status.Description = StatusDescriptionValueZiek;
            repository.Edit(status);
            repository.Save();

            Status updatedStatus = repository.GetSingle(x => x.Id == returnedId);

            Assert.AreEqual(StatusDescriptionValueZiek, updatedStatus.Description);
        }