Пример #1
0
        public SaaSApiController()
        {
            _nps  = new NpsRepository();
            _auth = new AuthRepository();
            _auth.SetDataProtectorProvider(Startup.DataProtectionProvider);

            _authProduct = new AuthProductRepository();
        }
Пример #2
0
        private Entities.Nps TestSaveAndRetrieve(INpsRepository repo, string id, string comment)
        {
            var nps = new Entities.Nps
            {
                Brand = "somebrand",
                Comment = comment,
                Country = "Greece",
                CreatedAt = DateTime.Now,
                Id = id,
                Language = "lang",
                RatableId = "rid",
                RatableType = "rtype",
                Score = 5,
                UpdatedAt = DateTime.Now
            };

            repo.Save(nps);

            var result = repo.Get(id);
            Assert.IsNotNull(result);

            return nps;
        }