예제 #1
0
        public async Task PostAssemblyNormalTest()
        {
            // Arrange
            var assembly = GetAssembly();

            assembly.Id = 0;
            var assemblyController = new AssemblyController();

            // Act
            var result = await assemblyController.Post(assembly);

            // Assert
            Assert.True(result.Success);
            Assert.NotNull(result.Data);
        }
예제 #2
0
        public async Task PostAssemblyComponentNormalTest()
        {
            // Arrange
            var component = MapAddAssemblyComponentVM(GetAssemblyComponent());
            var assembly  = GetAssembly();

            component.AssemblyId = assembly.Id;
            var assemblyController = new AssemblyController();

            // Act
            var result = await assemblyController.Post(component);

            // Assert
            Assert.True(result.Success);
            Assert.NotNull(result.Data);
        }