public void ClippedSoftwareTestEmptyEqual()
        {
            ClippedSoftware clippedSoftware = new ClippedSoftware();

            Assert.AreEqual("1", clippedSoftware.UploaderID);
            Assert.AreEqual("2", clippedSoftware.SoftwareID);
            Assert.AreEqual(DateTime.MinValue, clippedSoftware.ClipDate);
            Assert.AreEqual(0, clippedSoftware.Id);
        }
        public void ClippedSoftwareTestConfirmNotEqual()
        {
            ClippedSoftware clippedSoftware = new ClippedSoftware("1e56", "2g52", DateTime.Today, 20);

            Assert.AreNotEqual("2e56", clippedSoftware.UploaderID);
            Assert.AreNotEqual("1g52", clippedSoftware.SoftwareID);
            Assert.AreNotEqual(DateTime.MinValue, clippedSoftware.ClipDate);
            Assert.AreNotEqual(19, clippedSoftware.Id);
        }
        public void ClippedSoftwareTestConfirmEqual()
        {
            ClippedSoftware clippedSoftware = new ClippedSoftware("1e56", "2g52", DateTime.Today, 20);

            Assert.AreEqual("1e56", clippedSoftware.UploaderID);
            Assert.AreEqual("2g52", clippedSoftware.SoftwareID);
            Assert.AreEqual(DateTime.Today, clippedSoftware.ClipDate);
            Assert.AreEqual(20, clippedSoftware.Id);
        }
        public void ClippedSoftwareTestEmptyNotEqual()
        {
            ClippedSoftware clippedSoftware = new ClippedSoftware();

            Assert.AreNotEqual("2", clippedSoftware.UploaderID);
            Assert.AreNotEqual("1", clippedSoftware.SoftwareID);
            Assert.AreNotEqual(DateTime.Today, clippedSoftware.ClipDate);
            Assert.AreNotEqual(1, clippedSoftware.Id);
        }
Exemple #5
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ClippedSoftware = await _context.ClippedSoftware.FirstOrDefaultAsync(m => m.Id == id);

            if (ClippedSoftware == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Exemple #6
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            ClippedSoftware = await _context.ClippedSoftware.FindAsync(id);

            if (ClippedSoftware != null)
            {
                _context.ClippedSoftware.Remove(ClippedSoftware);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }