public void ExceptionTestFor_BranchCannotblank()
        {
            Branch Branch = new Branch()
            {
                BranchId       = " 1",
                UserName       = "******",
                PhoneNumber    = "8987656778",
                Password       = "******",
                Email          = "*****@*****.**",
                BranchName     = "abc",
                BranchLocation = "gadag",
                TotalVehicle   = 50
            };
            //Assert
            var ex = Assert.Throws <FieldscannotEmptyException>(() => _BranchServices.CreateAccount(Branch));

            Assert.Equal("Fields can not be blank ", ex.Messages);
        }
示例#2
0
        public void Test_for_CreateAccountforBranch()
        {
            Branch branch = new Branch()
            {
                BranchId       = "1",
                BranchName     = "aa",
                BranchLocation = "aaa",
                Email          = "*****@*****.**",
                Password       = "******",
                PhoneNumber    = "1111111111",
                TotalVehicle   = 12,
                UserName       = "******"
            };

            var result = _BranchServices.CreateAccount(branch);

            Assert.True(result);
        }