예제 #1
0
        public void ShouldDeleteSubscription()
        {
            //arrange
            var user             = GenerateUser();
            var userSubscription = GenerateUser();

            //act
            var dataLayer = new DataLayer.Sql.DataLayer(ConnectionSql);

            dataLayer.AddUser(user);
            dataLayer.AddUser(userSubscription);

            dataLayer.AddSubscription(user, userSubscription);

            dataLayer.DeleteSubscription(user, userSubscription);
            var areFriends = dataLayer.HaveSubscription(user, userSubscription);

            //assert
            Assert.AreEqual(areFriends, false);
        }