コード例 #1
0
        public void Repo_TextQueue_GetV1_Success()
        {
            var data = new TestDataFactory(UoW);

            data.Destroy();
            data.CreateTexts();

            var results = UoW.TextQueue.Get();

            results.Should().BeAssignableTo <IEnumerable <uvw_TextQueue> >();
            results.Count().Should().Be(UoW.TextQueue.Count());
        }
コード例 #2
0
        public void Repo_TextQueue_DeleteV1_Success()
        {
            var data = new TestDataFactory(UoW);

            data.Destroy();
            data.CreateTexts();

            var text = UoW.TextQueue.Get(QueryExpressionFactory.GetQueryExpression <uvw_TextQueue>().ToLambda())
                       .First();

            UoW.TextQueue.Delete(text);
            UoW.Commit();
        }
コード例 #3
0
        public void Repo_TextQueue_UpdateV1_Success()
        {
            var data = new TestDataFactory(UoW);

            data.Destroy();
            data.CreateTexts();

            var text = UoW.TextQueue.Get(QueryExpressionFactory.GetQueryExpression <uvw_TextQueue>().ToLambda())
                       .First();

            text.Body += "(Updated)";

            var result = UoW.TextQueue.Update(text);

            UoW.Commit();

            result.Should().BeAssignableTo <uvw_TextQueue>();
        }
コード例 #4
0
        public void Repo_TextQueue_CreateV1_Success()
        {
            var data = new TestDataFactory(UoW);

            data.Destroy();
            data.CreateTexts();

            var user = UoW.Users.Get(QueryExpressionFactory.GetQueryExpression <uvw_User>()
                                     .Where(x => x.UserName == TestDefaultConstants.UserName).ToLambda())
                       .First();

            var result = UoW.TextQueue.Create(
                Mapper.Map <uvw_TextQueue>(new TextV1()
            {
                FromPhoneNumber = TestDefaultConstants.UserPhoneNumber,
                ToPhoneNumber   = TestDefaultConstants.UserPhoneNumber,
                Body            = "Body-" + Base64.CreateString(32),
                SendAtUtc       = DateTime.UtcNow,
            }));

            UoW.Commit();

            result.Should().BeAssignableTo <uvw_TextQueue>();
        }