public void TestDisputeConstructor_DictionaryOfReplacementValuesShouldHaveLengthOfOne() { //Arrange Dispute myDispute; //Act myDispute = new Dispute("Season", "Advent", "522bb79455449d881b004d27"); //Assert Assert.AreEqual(1, myDispute.getReplacementValues().Count); }
public void TestClassDispute_MethodAddUserReplacementvalue_ValueDoesNotExistAddNewReplacementValue() { //Arrange Dispute myDispute = new Dispute("Season", "Advent", "522bb79455449d881b004d27"); List <ReplacementValue> expectedValue = new List <ReplacementValue>() { new ReplacementValue("Advent", "522bb79455449d881b004d27"), new ReplacementValue("Lent", "522bb79455449d881b004d27") }; //Act myDispute.AddUserReplacementvalue("Lent", "522bb79455449d881b004d27"); //Assert CollectionAssert.AreEqual(expectedValue.AsReadOnly(), myDispute.getReplacementValues()); }
public void TestClassDispute_MethodAddUserReplacementvalue_ValueAlreadyExistsJustAddTheUser() { //Arrange Dispute myDispute = new Dispute("Season", "Advent", "522bb79455449d881b004d27"); List <ReplacementValue> expectedValue = new List <ReplacementValue>() { new ReplacementValue("Advent", "522bb79455449d881b004d27") }; expectedValue[0].AddInsitutionId("9999979455449d881b004d27"); //Act myDispute.AddUserReplacementvalue("Advent", "9999979455449d881b004d27"); //Assert CollectionAssert.AreEqual(expectedValue.AsReadOnly(), myDispute.getReplacementValues()); }
public void TestClassDispute_MethodUpdateUserReplacementValue_UserReplacementValueDoesNotAlreadyExist() { //Arrange Dispute myDispute; List <ReplacementValue> expectedValue = new List <ReplacementValue>() { new ReplacementValue("advent", "522bb79455449d881b004d27"), new ReplacementValue("lent", "522bb79455449d881b004d27") }; expectedValue[0].RemoveInstituionId("522bb79455449d881b004d27"); //Act myDispute = new Dispute("Season", "Advent", "522bb79455449d881b004d27"); myDispute.UpdateUserReplacementValue("Lent", "Advent", "522bb79455449d881b004d27"); //Assert are equal CollectionAssert.AreEqual(expectedValue.AsReadOnly(), myDispute.getReplacementValues()); }
public void TestDisputeConstructor_DictionaryOfReplacementValuesIsProperlyConstructed() { //Arrange Dispute myDispute; //Act myDispute = new Dispute("Season", "advent", "522bb79455449d881b004d27"); //Assert Assert.AreEqual(new ReplacementValue("advent", "522bb79455449d881b004d27"), myDispute.getReplacementValues()[0]); }