public async Task InsertReward_Add_NewRecord_If_Recipient_Not_SameAs_Sender_And_AllIds_In_DBsets() { _rewardRecognitionService = SetupRewardRecognitionService(); List<Reward> rewardsToAdd = new List<Reward>(); rewardsToAdd.Add(new Reward() { Recipient = "jdoe", RewardTypeID = 1, RewardReasonID = 1, RewardStatusID = 1, CreatedBy = "ssmith" }); var result = await _rewardRecognitionService.InsertRewardAsync(rewardsToAdd); Assert.AreEqual(result.Count, 1); }
public async Task InsertReward_Cannot_Add_If_RewardStatus_Not_Exist_In_DbSet() { _rewardRecognitionService = SetupRewardRecognitionService(); List<Reward> rewardsToAdd = new List<Reward>(); rewardsToAdd.Add(new Reward() { Recipient = "jdoe", RewardTypeID = 1, RewardReasonID = 1, RewardStatusID = 999, CreatedBy = "ssmith" }); var result = await _rewardRecognitionService.InsertRewardAsync(rewardsToAdd); Assert.AreEqual(result.Count, 0); }