Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added unit-test
  • Loading branch information
mvanbeusekom committed Apr 26, 2021
commit 96138cfb4f3ad7c7734d584f0964a3ee3d47ef30
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'package:flutter_test/flutter_test.dart';
import 'package:in_app_purchase_platform_interface/in_app_purchase_platform_interface.dart';

void main() {
group('Constructor Tests', () {
test(
'fromSkProduct should correctly parse data from a SKProductWrapper instance.',
() {
final ProductDetails productDetails = ProductDetails(
id: 'id',
title: 'title',
description: 'description',
price: '13.37',
currencyCode: 'USD',
rawPrice: 13.37
);

expect(productDetails.id, 'id');
expect(productDetails.title, 'title');
expect(productDetails.description, 'description');
expect(productDetails.rawPrice, 13.37);
expect(productDetails.currencyCode, 'USD');
});
});
}