Esempio n. 1
0
 public void GetFeeByIdSuccessfull()
 {
     var repo = new FeeRepository();
     var id = "79116c9f-d750-4faa-85c7-b7da36f23b38";
     var fee = repo.GetFeeById(id);
     Assert.AreEqual(id, fee.Id);
 }
Esempio n. 2
0
 public void ListFeeSuccessfully()
 {
     var repo = new FeeRepository();
     var fees = repo.ListFees();
     Assert.IsNotNull(fees);
     Assert.IsTrue(fees.Any());
 }
Esempio n. 3
0
        public void GetFeeByIdSuccessfull()
        {
            var content = File.ReadAllText("../../Fixtures/fees_get_by_id.json");
            var client = GetMockClient(content);

            var repo = new FeeRepository(client.Object);
            const string id = "79116c9f-d750-4faa-85c7-b7da36f23b38";
            var fee = repo.GetFeeById(id);
            Assert.AreEqual(id, fee.Id);
        }
Esempio n. 4
0
 public void CreateFeeWrongTo()
 {
     var repo = new FeeRepository();
     var feeId = Guid.NewGuid().ToString();
     var createdFee = repo.CreateFee(new Fee
     {
         Id = feeId,
         Amount = 1000,
         Name = "Test fee #1",
         FeeType = FeeType.Fixed,
         Cap = "1",
         Max = "3",
         Min = "2",
     });
     Assert.IsNotNull(createdFee);
     Assert.AreEqual("Test fee #1", createdFee.Name);
 }
Esempio n. 5
0
 public void CreateFeeSuccessfully()
 {
     var repo = new FeeRepository();
     var feeId = Guid.NewGuid().ToString();
     var createdFee = repo.CreateFee(new Fee
     {
         Id = feeId,
         Amount = 1000,
         Name = "Test fee #1",
         FeeType = FeeType.Fixed,
         Cap = "1",
         Max = "3",
         Min = "2",
         To = "buyer"
     });
     Assert.IsNotNull(createdFee);
 }
Esempio n. 6
0
        public void CreateFeeSuccessfully()
        {
            var content = File.ReadAllText("../../Fixtures/fees_create.json");
            var client = GetMockClient(content);

            var repo = new FeeRepository(client.Object);
            var feeId = Guid.NewGuid().ToString();
            var createdFee = repo.CreateFee(new Fee
            {
                Id = feeId,
                Amount = 1000,
                Name = "Test fee #1",
                FeeType = FeeType.Fixed,
                Cap = "1",
                Max = "3",
                Min = "2",
                To = "buyer"
            });
            Assert.IsNotNull(createdFee);
        }
Esempio n. 7
0
        public void ListFeeSuccessfully()
        {
            var content = File.ReadAllText("../../Fixtures/fees_list.json");
            var client = GetMockClient(content);

            var repo = new FeeRepository(client.Object);
            var fees = repo.ListFees();
            Assert.IsNotNull(fees);
            Assert.IsTrue(fees.Any());
        }