public static void Initialize(TestContext context2) { ARLoginContext context = new ARLoginContext(TestServer, TestAdmin, TestAdminPwd); try { //int totalMatch = -1; ARProxy<NRemedy_Test_Regular_Form> proxy = new ARProxy<NRemedy_Test_Regular_Form>(context); var models = proxy.GetEntryList( null, new string[] { "RequestID" }, null, 0, null, null); foreach (var model in models) { proxy.DeleteEntry(model); } } catch (Exception ex) { throw new Exception("env init in Construct error.", ex); } finally { context.Dispose(); } }
public void ARProxy_DeleteEntry_By_EntryId() { ARLoginContext context = new ARLoginContext(TestServer, TestAdmin, TestAdminPwd); try { ARProxy <NRemedy_Test_Regular_Form> proxy = new ARProxy <NRemedy_Test_Regular_Form>(context); DateTime dt = DateTime.Now; string entryId = proxy.CreateEntry(new NRemedy_Test_Regular_Form { CharacterField = "should not changed", Status = NRemedy_Test_Regular_Form.Status_Enum.Fixed, } ); Assert.AreNotEqual(null, entryId); NRemedy_Test_Regular_Form model = proxy.GetEntry(entryId); Assert.AreEqual(NRemedy_Test_Regular_Form.Status_Enum.Fixed, model.Status); //delete proxy.DeleteEntry(entryId); NRemedy_Test_Regular_Form model2 = proxy.GetEntry(entryId); Assert.IsNull(model2); } catch (Exception ex) { Assert.AreEqual(null, ex); } finally { context.Dispose(); } }
public static void Initialize(TestContext context2) { ARLoginContext context = null; try { context = new ARLoginContext(TestServer, TestAdmin, TestAdminPwd); //int totalMatch = -1; ARProxy <NRemedy_Test_Regular_Form> proxy = new ARProxy <NRemedy_Test_Regular_Form>(context); var models = proxy.GetEntryList( null, new string[] { "RequestID" }, null, 0, null, null); foreach (var model in models) { proxy.DeleteEntry(model); } } catch (Exception ex) { throw new Exception("env init in Construct error.", ex); } finally { context.Dispose(); } }
public static void Initialize(TestContext context2) { ARLoginContext context = new ARLoginContext(TestServer, TestAdmin, TestAdminPwd); try { //int totalMatch = -1; ARProxy <NRemedy_Test_Regular_Form> proxy = new ARProxy <NRemedy_Test_Regular_Form>(context); var models = proxy.GetEntryList( null, new string[] { "RequestID" }, null, 0, null, null); foreach (var model in models) { proxy.DeleteEntry(model); } NRemedy_Test_Regular_Form newentry = new NRemedy_Test_Regular_Form(); newentry.CharacterField = TestCharacterFieldValue; newentry.Radio_Button_Field = null; newentry.IntegerField = 1; for (int i = 0; i < 7; i++) { proxy.CreateEntry(newentry); } newentry.CharacterField = TestCharacterFieldValueChinese; newentry.IntegerField = 2; for (int i = 0; i < 9; i++) { proxy.CreateEntry(newentry); } newentry.CharacterField = TestCharacterFieldValueChinese + "Set Something"; newentry.IntegerField = 3; for (int i = 0; i < 2; i++) { proxy.CreateEntry(newentry); } } catch (Exception ex) { throw new Exception("env init in Construct error.", ex); } finally { context.Dispose(); } }
public static void Initialize(TestContext context2) { ARLoginContext context = new ARLoginContext(TestServer, TestAdmin, TestAdminPwd); try { //int totalMatch = -1; ARProxy<NRemedy_Test_Regular_Form> proxy = new ARProxy<NRemedy_Test_Regular_Form>(context); var models = proxy.GetEntryList( null, new string[] { "RequestID" }, null, 0, null, null); foreach (var model in models) { proxy.DeleteEntry(model); } NRemedy_Test_Regular_Form newentry = new NRemedy_Test_Regular_Form(); newentry.CharacterField = TestCharacterFieldValue; newentry.Radio_Button_Field = null; newentry.IntegerField = 1; for (int i = 0; i < 7; i++) { proxy.CreateEntry(newentry); } newentry.CharacterField = TestCharacterFieldValueChinese; newentry.IntegerField = 2; for (int i = 0; i < 9; i++) { proxy.CreateEntry(newentry); } newentry.CharacterField = TestCharacterFieldValueChinese + "Set Something"; newentry.IntegerField = 3; for (int i = 0; i < 2; i++) { proxy.CreateEntry(newentry); } } catch (Exception ex) { throw new Exception("env init in Construct error.", ex); } finally { context.Dispose(); } }
public void ARProxy_CreateEntry_datatype_character_chinese_with_delete() { ARLoginContext context = new ARLoginContext(TestServer, TestAdmin, TestAdminPwd); try { ARProxy <NRemedy_Test_Regular_Form> proxy = new ARProxy <NRemedy_Test_Regular_Form>(context); string entryId = proxy.CreateEntry(new NRemedy_Test_Regular_Form { CharacterField = TestCharacterFieldValueChinese }); Assert.AreNotEqual(null, entryId); //GetEntry NRemedy_Test_Regular_Form model = proxy.GetEntry(entryId); Assert.AreEqual(TestCharacterFieldValueChinese, model.CharacterField); //DeleteEntry proxy.DeleteEntry(model); //GetAgain model = proxy.GetEntry(entryId); Assert.IsNull(model); //DeleteAgain proxy.DeleteEntry(entryId); } catch (ARException ex) { Assert.AreEqual(null, ex); } finally { context.Dispose(); } }
public void ARProxy_CreateEntry_datatype_character_chinese_with_delete() { ARLoginContext context = new ARLoginContext(TestServer, TestAdmin, TestAdminPwd); try { ARProxy<NRemedy_Test_Regular_Form> proxy = new ARProxy<NRemedy_Test_Regular_Form>(context); string entryId = proxy.CreateEntry(new NRemedy_Test_Regular_Form { CharacterField = TestCharacterFieldValueChinese }); Assert.AreNotEqual(null, entryId); //GetEntry NRemedy_Test_Regular_Form model = proxy.GetEntry(entryId); Assert.AreEqual(TestCharacterFieldValueChinese, model.CharacterField); //DeleteEntry proxy.DeleteEntry(model); //GetAgain model = proxy.GetEntry(entryId); Assert.IsNull(model); //DeleteAgain proxy.DeleteEntry(entryId); } catch (ARException ex) { Assert.AreEqual(null, ex); } finally { context.Dispose(); } }
public void ARProxy_DeleteEntry_By_EntryId() { ARLoginContext context = new ARLoginContext(TestServer, TestAdmin, TestAdminPwd); try { ARProxy<NRemedy_Test_Regular_Form> proxy = new ARProxy<NRemedy_Test_Regular_Form>(context); DateTime dt = DateTime.Now; string entryId = proxy.CreateEntry(new NRemedy_Test_Regular_Form { CharacterField = "should not changed", Status = NRemedy_Test_Regular_Form.Status_Enum.Fixed, } ); Assert.AreNotEqual(null, entryId); NRemedy_Test_Regular_Form model = proxy.GetEntry(entryId); Assert.AreEqual(NRemedy_Test_Regular_Form.Status_Enum.Fixed, model.Status); //delete proxy.DeleteEntry(entryId); NRemedy_Test_Regular_Form model2 = proxy.GetEntry(entryId); Assert.IsNull(model2); } catch (Exception ex) { Assert.AreEqual(null, ex); } finally { context.Dispose(); } }