private void CompanyDescription_D_Test() { var client = new CompanyDescription.CompanyDescriptionClient(_channel); CompanyDescriptionProto proto = client.GetCompanyDescription(new CompanyDescriptionKey() { Id = _companyDescription.Id.ToString() }); CompanyDescriptionList protos = new CompanyDescriptionList(); protos.Items.Add(proto); client.DeleteCompanyDescription(protos); proto = null; try { proto = client.GetCompanyDescription(new CompanyDescriptionKey() { Id = _companyDescription.Id.ToString() }); } catch (RpcException) { } Assert.IsNull(proto); }
private CompanyDescriptionProto CheckGetCompanyDescription(CompanyDescription.CompanyDescriptionClient client , CompanyDescriptionKey key, CompanyDescriptionProto compare = null) { CompanyDescriptionProto proto = null; try { proto = client.GetCompanyDescription(key); } catch (RpcException) { Assert.Fail(); } Assert.IsNotNull(proto); Assert.AreEqual(proto.Id, key.Id); if (compare != null) { Assert.AreEqual(proto.Company, compare.Company); Assert.AreEqual(proto.LanguageId, compare.LanguageId); Assert.AreEqual(proto.CompanyName, compare.CompanyName); Assert.AreEqual(proto.CompanyDescription, compare.CompanyDescription); } return(proto); }