public void AccountListResponseTest() { var response = EmbeddedResourceReader.ReadResponseAsString("accountList.sgml"); var ofx = _serializer.Deserialize(response); var serizlied = _serializer.Serialize(ofx); Assert.Equal(response, serizlied); }
public void AccountListResponseTest(OfxVersionEnum version) { var response = EmbeddedResourceReader.ReadResponseAsString("accountList", version); var serializer = _factory.Create(version); var ofx = serializer.Deserialize(response); var serialized = serializer.Serialize(ofx); Assert.Equal(response, serialized); }
public void BankAccount() { // Arrange var creditCardStatement = EmbeddedResourceReader.ReadResponseAsString("bankTransactions", OfxVersionEnum.Version1x); var serializer = new DefaultOfxSerializerFactory().Create(OfxVersionEnum.Version1x); var ofxPayload = serializer.Deserialize(creditCardStatement); // Act var statement = OfxStatementParser.Parse(ofxPayload); // Assert Assert.Equal("0000000000003158", statement.AccountNumber); Assert.Equal("USD", statement.Currency); Assert.Equal(1322.42m, statement.AvailableBalance); Assert.Equal(1327.42m, statement.LedgerBalance); Assert.Equal(2, statement.Transactions.Length); }