Exemplo n.º 1
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);
 }
Exemplo n.º 2
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);
 }
Exemplo n.º 3
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);
        }