public void AddEmptyRecord() { TestManager testManager = CreateTestManager(); NameValueCollection nameValueCollection = new NameValueCollection(); string output = testManager.AddRecord(nameValueCollection, _testIp); Assert.IsNull(output); }
public void AddRecordWithNoAnswers() { TestManager testManager = CreateTestManager(); NameValueCollection nameValueCollection = new NameValueCollection(); nameValueCollection.Add("name", "testName"); nameValueCollection.Add("surname", "testSurname"); nameValueCollection.Add("group", "1"); string output = testManager.AddRecord(nameValueCollection, _testIp); Assert.IsNull(output); }
public void AddRecordWithInvalidGroup() { TestManager testManager = CreateTestManager(); NameValueCollection nameValueCollection = new NameValueCollection(); nameValueCollection.Add("name", "testName"); nameValueCollection.Add("surname", "testSurname"); nameValueCollection.Add("group", "20"); nameValueCollection.Add("q1", "a1"); nameValueCollection.Add("q2", "a2"); nameValueCollection.Add("q3", "a3"); string output = testManager.AddRecord(nameValueCollection, _testIp); Assert.IsNotNull(output); }
public void AddValidRecordWithNotExistingAnswers() { TestManager testManager = CreateTestManager(); NameValueCollection nameValueCollection = new NameValueCollection(); nameValueCollection.Add("name", "testName"); nameValueCollection.Add("surname", "testSurname"); nameValueCollection.Add("group", "1"); nameValueCollection.Add("q1", "customAnswer"); nameValueCollection.Add("q2", "customAnswer"); nameValueCollection.Add("q3", "customAnswer"); string output = testManager.AddRecord(nameValueCollection, _testIp); Assert.IsNotNull(output); Assert.IsTrue(output.Contains("0/3")); }