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

            data.Destroy();
            data.CreateIssuers();

            var results = UoW.Issuers.Get();

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

            data.Destroy();
            data.CreateIssuers();

            var issuer = UoW.Issuers.Get(QueryExpressionFactory.GetQueryExpression <uvw_Issuer>()
                                         .Where(x => x.Name == TestDefaultConstants.IssuerName).ToLambda())
                         .Single();

            UoW.Issuers.Delete(issuer);
            UoW.Commit();
        }
コード例 #3
0
        public void Repo_Issuers_UpdateV1_Success()
        {
            var data = new TestDataFactory(UoW);

            data.Destroy();
            data.CreateIssuers();

            var issuer = UoW.Issuers.Get(QueryExpressionFactory.GetQueryExpression <uvw_Issuer>()
                                         .Where(x => x.Name == TestDefaultConstants.IssuerName).ToLambda())
                         .Single();

            issuer.Name += "(Updated)";

            var result = UoW.Issuers.Update(issuer);

            UoW.Commit();

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

            data.Destroy();
            data.CreateIssuers();

            var result = UoW.Issuers.Create(
                Mapper.Map <uvw_Issuer>(new IssuerV1()
            {
                Name        = TestDefaultConstants.IssuerName,
                IssuerKey   = TestDefaultConstants.IssuerKey,
                IsEnabled   = true,
                IsDeletable = false,
            }));

            UoW.Commit();

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