Ejemplo n.º 1
0
        public void ShouldBeAbleToReturnIdWhenAddingReward()
        {
            RewardModel testReward = new RewardModel
            {
                Title       = "1",
                Description = "1"
            };
            InMemoryStorage storage    = new InMemoryStorage();
            int             expectedId = 6;

            int actualId = storage.AddReward(testReward);

            Assert.Equal(expectedId, actualId);
        }
Ejemplo n.º 2
0
        public void ShouldBeAbleToThrowExeptionWhenRewardIsNull()
        {
            InMemoryStorage storage = new InMemoryStorage();

            Assert.Throws <ArgumentNullException>(() => storage.AddReward(null));
        }