Ejemplo n.º 1
0
        public void Test_Create_Set_With_Valid_Details()
        {
            // ARRANGE
            const string         paramOwnerCode      = "OWNER2";
            const string         paramSetPurposeCode = "SET_PURPOSE2";
            const string         paramSetColourCode  = "SET_COLOUR2";
            const string         paramDescription    = "My Description";
            ISetWithPacksFactory setFactory          = CreateSetFactory();

            // ACT
            ISet set = setFactory.Create32BoardSet(
                ownerCode: paramOwnerCode,
                setPurposeCode: paramSetPurposeCode,
                setColourCode: paramSetColourCode,
                description: paramDescription);

            // ASSERT
            Assert.IsNotNull(set);
            Assert.AreEqual(paramOwnerCode, set.Owner.Code);
            Assert.AreEqual(paramSetPurposeCode, set.SetPurpose.Code);
            Assert.AreEqual(paramSetColourCode, set.SetColour.Code);
            Assert.AreEqual(paramDescription, set.Description);
            Assert.AreEqual(1, set.LowBoardNumber);
            Assert.AreEqual(32, set.HighBoardNumber);
            Assert.AreNotEqual(Guid.Empty, set.Id);
        }
Ejemplo n.º 2
0
        public void Test_Create_Set_With_Null_Set_Colour_Code_Throws_Exception()
        {
            // ARRANGE
            const string         paramOwnerCode      = "OWNER2";
            const string         paramSetPurposeCode = "SET_PURPOSE2";
            const string         paramDescription    = "My Description";
            ISetWithPacksFactory setFactory          = CreateSetFactory();

            // ACT
            _ = setFactory.Create32BoardSet(
                ownerCode: paramOwnerCode,
                setPurposeCode: paramSetPurposeCode,
                setColourCode: null,
                description: paramDescription);

            // ASSERT
            Assert.Fail();
        }
Ejemplo n.º 3
0
        public void Test_Create_Set_With_Empty_Description_Throws_Exception()
        {
            // ARRANGE
            const string         paramOwnerCode      = "OWNER2";
            const string         paramSetPurposeCode = "SET_PURPOSE2";
            const string         paramSetColourCode  = "SET_COLOUR2";
            ISetWithPacksFactory setFactory          = CreateSetFactory();

            // ACT
            _ = setFactory.Create32BoardSet(
                ownerCode: paramOwnerCode,
                setPurposeCode: paramSetPurposeCode,
                setColourCode: paramSetColourCode,
                description: string.Empty);

            // ASSERT
            Assert.Fail();
        }