public void GetCurrencyInfo_NoVersion() { var getCurrencyInfoData = GetCurrencyInfo(AgentLocation.NY, string.Empty); // ASSERT // Should not return errors Assert.IsFalse(getCurrencyInfoData.GetCurrencyInfoResp.Errors.Any(), TestLogHelper.BusinessErrorsMsg(getCurrencyInfoData.GetCurrencyInfoResp)); // Should return CurrencyInfos Assert.IsTrue(getCurrencyInfoData.GetCurrencyInfoResp.Payload.CurrencyInfos.Any(), TestLogHelper.AssertFailedMsg("GetCurrencyInfo requested without version did not return CurrencyInfos, should return all Currencies")); }
public void GetCurrencyInfo_WithCurrentVersion() { var getCurrencyInfoData = GetCurrencyInfo(AgentLocation.NY, string.Empty); getCurrencyInfoData = GetCurrencyInfo(AgentLocation.NY, getCurrencyInfoData.GetCurrencyInfoResp.Payload.Version); // ASSERT // Should not return errors Assert.IsFalse(getCurrencyInfoData.GetCurrencyInfoResp.Errors.Any(), TestLogHelper.BusinessErrorsMsg(getCurrencyInfoData.GetCurrencyInfoResp)); // Should not return CurrencyInfos Assert.IsFalse(getCurrencyInfoData.GetCurrencyInfoResp.Payload.CurrencyInfos.Any(), TestLogHelper.AssertFailedMsg("GetCurrencyInfo requested with current version returned CurrencyInfos, should return none")); }
public void Industry() { var industryData = new IndustryData(); var agentLocation = AgentLocation.NY; industryData.IndustryResp = _industryOperations.Industry(agentLocation); // ASSERT // Should not return errors Assert.IsFalse(industryData.IndustryResp.Errors.Any(), TestLogHelper.BusinessErrorsMsg(industryData.IndustryResp)); Assert.IsTrue(industryData.IndustryResp.Payload.IndustryInfoList.Any(), TestLogHelper.AssertFailedMsg("Industry did not return any IndustryInfos.")); }
public void Profile() { var profileData = new ProfileData(); profileData.ProfileReq = ProfileRequestFactory.GenerateBaseProfileRequest(); var agentLocation = AgentLocation.NY; var agent = _agents.GetAgent(agentLocation); profileData.ProfileReq.AgentID = agent.AgentId; profileData.ProfileReq.AgentSequence = agent.AgentSequence; profileData.ProfileResp = _profileOperations.Profile(profileData.ProfileReq); // ASSERT // Should not return errors Assert.IsFalse(profileData.ProfileResp.Errors.Any(), TestLogHelper.BusinessErrorsMsg(profileData.ProfileResp)); // Should return ProductProfileItems Assert.IsTrue(profileData.ProfileResp.Payload.ProductProfileItem.Any(), TestLogHelper.AssertFailedMsg("Profile did not return any ProductProfileItems.")); // Should return ProfileItems Assert.IsTrue(profileData.ProfileResp.Payload.ProfileItem.Any(), TestLogHelper.AssertFailedMsg("Profile did not return any ProfileItems.")); }