예제 #1
0
        public void Test_for_DeleteGlocery()
        {
            glocery glocery = new glocery()
            {
                GloceryId = 1,
            };

            var Result = _AdminServices.DeleteGlocery(glocery.GloceryId);

            Assert.True(Result);
        }
예제 #2
0
        public void Test_for_AddGlocery()
        {
            glocery glocery = new glocery()
            {
                GloceryId    = 1,
                GloceryName  = "",
                GloceryPrice = 11,
                CategoryId   = 2
            };
            var Result  = _AdminServices.AddGlocery(glocery);
            var Glocery = Result.ToString();

            Assert.NotNull(Glocery);
        }
예제 #3
0
        public void Test_for_ViewGlocery()
        {
            glocery glocery = new glocery()
            {
                GloceryId = 1,
            };



            var Result      = _AdminServices.ViewGlocery(glocery.GloceryId);
            var ViewGlocery = Result.ToString();

            Assert.NotNull(ViewGlocery);
        }
        public void ExceptionTestFor_GloceryDetailsCannotblank()
        {
            glocery glocery = new glocery()
            {
                GloceryId    = 1,
                CategoryId   = 1,
                GloceryName  = "",
                GloceryPrice = 3
            };
            //Assert
            var ex = Assert.Throws <FieldscannotEmptyException>(() => _AdminServices.AddGlocery(glocery));

            Assert.Equal("Fields can not be blank ", ex.Messages);
        }
        public void ExceptionTestFor_GloceryNotFound()
        {
            glocery glocery = new glocery()
            {
                CategoryId   = 1,
                GloceryId    = 1,
                GloceryName  = "",
                GloceryPrice = 11
            };
            //Assert
            var ex = Assert.Throws <GloceryNotFoundException>(() => _CustomerServices.SearchGlocery(glocery));

            Assert.Equal("Glocery Not Found ", ex.Messages);
        }
예제 #6
0
        public void Test_for_ViewGloceryForCustomer()
        {
            glocery glocery = new glocery()
            {
                GloceryId    = 1,
                CategoryId   = 1,
                GloceryName  = "",
                GloceryPrice = 3
            };



            var Result = _CustomerServices.ViewGlocery(glocery);

            Assert.NotNull(Result);
        }
예제 #7
0
        public void Test_for_SearchGlocery()
        {
            glocery glocery = new glocery()
            {
                GloceryId    = 1,
                CategoryId   = 1,
                GloceryName  = "",
                GloceryPrice = 3
            };



            var Result     = _CustomerServices.ViewGlocery(glocery);
            var GetGlocery = _CustomerServices.GetGlocery(glocery);

            Assert.Equal(GetGlocery, Result);
        }
        public glocery ViewGlocery(int GloceryId)
        {
            glocery ObjGlocery = new glocery();

            return(ObjGlocery);
        }
        public int AddGlocery(glocery glocery)
        {
            glocery ObjGlocery = new glocery();

            return(ObjGlocery.GloceryId);
        }
        public glocery ViewGlocery(glocery glocery)
        {
            glocery ObjGlocery = new glocery();

            return(ObjGlocery);
        }
        public glocery SearchGlocery(glocery glocery)
        {
            glocery ObjGlocery = new glocery();

            return(ObjGlocery);
        }
        public glocery PurchaseGlocery(glocery glocery)
        {
            glocery ObjGlocery = new glocery();

            return(ObjGlocery);
        }