CCTB / x-CCTB-445

0 stars 0 forks source link

Learning Outcomes #1

Open dagilleland opened 10 years ago

dagilleland commented 10 years ago

Topics

dagilleland commented 10 years ago

WebAPI

dagilleland commented 10 years ago

SignalR

dagilleland commented 10 years ago

Windows Forms

Error Logging

Windows Reports


dagilleland commented 10 years ago

Unit Testing

Create Unit Tests for CRUD functionality

Sample

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NorthwindSystem.BLL;
using NorthwindSystem.Entities;
using Xunit;
using Xunit.Extensions;

namespace NorthwindSystem.Requirements.UnitTests.CRUD
{
    public class CRUD_Shipper
    {
        [Fact]
        [AutoRollback]
        public void Should_Add()
        {
            // Arrange
            var sut = new NorthwindManager();
            var expected = new Shipper()
            {
                CompanyName = "Montgomery Scott's Transporter Service",
                Phone = "780.555.1212"
            };

            // Act
            var actualId = sut.AddShipper(expected);

            // Assert
            Assert.True(actualId > 0);
            var actual = sut.GetShipper(actualId);
            Assert.Equal(expected.CompanyName, actual.CompanyName);
            Assert.Equal(expected.Phone, actual.Phone);
            Assert.Equal(actualId, actual.ShipperID);
        }

        [Fact]
        [AutoRollback]
        public void Should_Update()
        {
            // Arrange
            // Act
            // Assert
            throw new NotImplementedException();
        }

        [Fact]
        [AutoRollback]
        public void Should_Delete()
        {
            // Arrange
            // Act
            // Assert
            throw new NotImplementedException();
        }
    }
}
dagilleland commented 10 years ago

EF 6 - CRUD

dagilleland commented 10 years ago

Universal Windows app samples

From Microsoft

dgilleland commented 10 years ago

Reporting

product sales report