Пример #1
0
        public void CreateUpdateDelete_Pass()
        {
            string tenantName  = $"test tenant {Guid.NewGuid()}";
            string tenantName2 = $"{tenantName} 2";

            //Create
            var id = m_sut.InsertTenant(new TenantDto(0, tenantName));

            Assert.True(id > 0);

            //Get
            var tenant = m_sut.GetTenant(id);

            Assert.NotNull(tenant);
            Assert.Equal(tenantName, tenant.Name);

            m_testOutputHelper.WriteLine($"CreateUpdateDelete_Pass.tenantName : {tenantName}: {id}");

            try {
                //Update
                m_sut.UpdateTenant(new TenantDto(id, tenantName2));
                tenant = m_sut.GetTenant(tenantName2);
                Assert.NotNull(tenant);
                Assert.Equal(id, tenant.Id);
                Assert.Equal(tenantName2, tenant.Name);
            }
            finally {
                //Delete
                m_sut.DeleteTenant(id);
                tenant = m_sut.GetTenant(id);
                Assert.Null(tenant);
            }
        }
Пример #2
0
 void ITenantManager.DeleteTenant(int id)
 {
     m_tenantProvider.DeleteTenant(id);
 }
 public void Dispose()
 {
     m_journalEntryProvider.DeleteJournalEntry(m_tenantId, m_journalNum);
     m_tenantProvider.DeleteTenant(m_tenantId);
 }
 public void Dispose()
 {
     m_tenantProvider.DeleteTenant(m_tenantId);
 }