Exemplo n.º 1
0
        public void GetViewData_Always_ReturnsWrappedCalculationGroup()
        {
            // Setup
            var failureMechanism  = new MacroStabilityInwardsFailureMechanism();
            var calculationsGroup = new CalculationGroup();
            var scenariosContext  = new MacroStabilityInwardsScenariosContext(calculationsGroup, failureMechanism);

            // Call
            object viewData = info.GetViewData(scenariosContext);

            // Assert
            Assert.AreSame(calculationsGroup, viewData);
        }
Exemplo n.º 2
0
        public void CreateInstance_WithContext_ReturnsView()
        {
            // Setup
            var failureMechanism  = new MacroStabilityInwardsFailureMechanism();
            var calculationsGroup = new CalculationGroup();
            var context           = new MacroStabilityInwardsScenariosContext(calculationsGroup, failureMechanism);

            // Call
            IView view = info.CreateInstance(context);

            // Assert
            Assert.IsInstanceOf <MacroStabilityInwardsScenariosView>(view);
        }
Exemplo n.º 3
0
        public void Constructor_ExpectedValues()
        {
            // Setup
            var failureMechanism = new MacroStabilityInwardsFailureMechanism();
            var calculationGroup = new CalculationGroup();

            // Call
            var context = new MacroStabilityInwardsScenariosContext(calculationGroup, failureMechanism);

            // Assert
            Assert.IsInstanceOf <WrappedObjectContextBase <CalculationGroup> >(context);
            Assert.AreSame(calculationGroup, context.WrappedData);
            Assert.AreSame(failureMechanism, context.FailureMechanism);
        }